Re: Silent data corruption in PostgreSQL 17 - how to detect it proactively? - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Silent data corruption in PostgreSQL 17 - how to detect it proactively?
Date
Msg-id CAHyXU0yCP4+XaYSxX3n5VaR9ym6cejDAvnGYUvqe4CECzLLmcA@mail.gmail.com
Whole thread Raw
In response to Re: Silent data corruption in PostgreSQL 17 - how to detect it proactively?  (Vladlen Popolitov <v.popolitov@postgrespro.ru>)
List pgsql-general
On Tue, Sep 16, 2025 at 7:25 AM Vladlen Popolitov <v.popolitov@postgrespro.ru> wrote:
Checksum calculation takes ~0.5% of query time, it is not bottleneck
in PostgreSQL.

I consider checksums=on to be a mandatory setting.  Often, these types of things are not bugs in postgres itself, but bugs in storage, the underlying operating system, or extensions.  Checksums can and will protect you, and may even bring you close to the thing causing the corruption.  Given that your replica is ok, this very much smells like a similar type of issue.

In a prior case, I was using pl/sh to load data to the database with 'copy', and for what I believe to be o/s issues, was getting corruption.  Enabling checksums completely addressed the source of the damage.  Turn them on!

merlin

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: EDB Windows Installer on Windows Server 2025
Next
From: Adrian Klaver
Date:
Subject: Re: encoding problem while inictial copy in logical replication