Re: [HACKERS] wal_checksum = on (default) | off

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>
Cc: "Simon Riggs" <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] wal_checksum = on (default) | off
Date: 2007-01-04 20:22:10
Message-ID: 26352.1167942130@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Florian Weimer <fw(at)deneb(dot)enyo(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2007-01-04 20:26:12 Re: [HACKERS] [Fwd: Index Advisor]
Previous Message Florian Weimer 2007-01-04 20:16:02 Re: [HACKERS] wal_checksum = on (default) | off

Browse pgsql-patches by date

  From Date Subject
Next Message Gurjeet Singh 2007-01-04 20:26:12 Re: [HACKERS] [Fwd: Index Advisor]
Previous Message Florian Weimer 2007-01-04 20:16:02 Re: [HACKERS] wal_checksum = on (default) | off