Re: [PATCHES] wal_checksum = on (default) | off - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] wal_checksum = on (default) | off
Date
Msg-id 26352.1167942130@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] wal_checksum = on (default) | off  (Florian Weimer <fw@deneb.enyo.de>)
Responses Re: [PATCHES] wal_checksum = on (default) | off  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-hackers
Florian Weimer <fw@deneb.enyo.de> writes:
> * Tom Lane:
>> There's a lot of math behind CRCs but AFAIR Adler's method is pretty
>> much ad-hoc.

> Correct me if I'm wrong, but the main reason for the WAL CRC is to
> detect partial WAL writes (due to improper caching, for instance).

Well, that's *a* reason, but not the only one, and IMHO not one that
gives any particular guidance on what kind of checksum to use.

> This means that you're out of the realm of traditional CRC analysis
> anyway, because the things you are guarding against are neither burts
> errors nor n-bit errors (for small n).

I think short burst errors are fairly likely: the kind of scenario I'm
worried about is a wild store corrupting a word of a WAL entry while
it's waiting around to be written in the WAL buffers.  So the CRC math
does give me some comfort that that'll be detected.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: [PATCHES] wal_checksum = on (default) | off
Next
From: Bruce Momjian
Date:
Subject: Re: Tabs or Spaces