Re: New CRC algorithm: Slicing by 8 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: New CRC algorithm: Slicing by 8
Date
Msg-id 27400.1161630727@sss.pgh.pa.us
Whole thread Raw
In response to Re: New CRC algorithm: Slicing by 8  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: New CRC algorithm: Slicing by 8  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:
> On Mon, 2006-10-23 at 13:52 -0400, Tom Lane wrote:
>> No can do --- we rely on the checksums to be able to tell when we've hit
>> the end of WAL during replay.  

> No we don't: Zero length records are the trigger for EOF.

Only if the file happens to be all-zero already, which is not the normal
operating state (see WAL-file recycling).  Otherwise you have to be able
to detect an invalid record.

There are actually three checks used to detect end of WAL: zero record
length, invalid checksum, and incorrect back-pointer.  Zero length is
the first and cleanest-looking test, but AFAICS we have to have both of
the others to avoid obvious failure modes.
        regards, tom lane


pgsql-hackers by date:

Previous
From: richard-pgodbc@armchair.mb.ca
Date:
Subject: Tsearch2 index size
Next
From: Jeremy Drake
Date:
Subject: Re: New CRC algorithm: Slicing by 8