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

From Gregory Stark
Subject Re: New CRC algorithm: Slicing by 8
Date
Msg-id 87k62ph550.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: New CRC algorithm: Slicing by 8  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: New CRC algorithm: Slicing by 8  ("Simon Riggs" <simon@2ndquadrant.com>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Simon is essentially arguing that if we are willing to assume no
> incomplete write() we may as well assume it for WAL too.  This seems
> to me to be raising the risk significantly, but I admit that I can't
> put my finger on why exactly.

Actually I think we can deal with torn pages in the WAL more easily than in
database files anyways. In database files we need to get the entire page
correctly one way or the other so we need full_page_writes in order to be deal
properly. 

In the WAL we just need to be able to detect torn pages and stop reading WAL
at that point. That's easier and doesn't really need a CRC. We could just
adopt the Sybase strategy of storing a unique id number every 512 bytes
throughout the WAL page. If those numbers don't match then we have a torn
page; the system crashed at that point and we should stop reading WAL pages.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [DOCS] Replication documentation addition
Next
From: Ron Mayer
Date:
Subject: Re: [SPAM?] Re: Asynchronous I/O Support