Re: data checksums - Mailing list pgsql-general

From Laurenz Albe
Subject Re: data checksums
Date
Msg-id 830004cb0a514d803d13ab9abcfa15fbae365748.camel@cybertec.at
Whole thread Raw
In response to Re: data checksums  (Christophe Pettus <xof@thebuild.com>)
Responses Re: data checksums
List pgsql-general
On Tue, 2024-08-06 at 09:29 -0700, Christophe Pettus wrote:
>
> > On Aug 6, 2024, at 08:11, bruno vieira da silva <brunogiovs@gmail.com> wrote:
> >
> > so my question is why data checksums aren't enabled by default on pg?
>
> At this point, mostly historical reasons.  They're also superfluous if your underlying
> file system or storage hardware does storage-level corruption checks (which most don't).

I am surprised by that.  Would you say that most storage systems will happily give you a
garbage block if there was a hardware problem somewhere?

> > the pg doc
> > mentions a considerable performance penality, how considerable it is?
>
> That line is probably somewhat out of date at this point.  We haven't seen a significant
> slowdown in enabling them on any modern hardware.  I always turn them on, except on the
> type of filesystems/hardware mentioned above.

Turning data checksums on will write WAL for hint bits, which can significantly increase
the amount of WAL written.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: Vamsi Chava
Date:
Subject: Streaming replication issue post upgrade from version 11 to 14 on windows 2016 Server
Next
From: Christophe Pettus
Date:
Subject: Re: data checksums