Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group