Re: Page Checksums - Mailing list pgsql-hackers

From David Fetter
Subject Re: Page Checksums
Date
Msg-id 20111218085400.GA14268@fetter.org
Whole thread Raw
In response to Re: Page Checksums  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Page Checksums  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Sun, Dec 18, 2011 at 10:14:38AM +0200, Heikki Linnakangas wrote:
> On 17.12.2011 23:33, David Fetter wrote:
> >What:
> >
> >     Please find attached a patch for 9.2-to-be which implements page
> >     checksums.  It changes the page format, so it's an initdb-forcing
> >     change.
> >
> >How:
> >     In order to ensure that the checksum actually matches the hint
> >     bits, this makes a copy of the page, calculates the checksum, then
> >     sends the checksum and copy to the kernel, which handles sending
> >     it the rest of the way to persistent storage.
> >...
> >If this introduces new failure modes, please detail, and preferably
> >demonstrate, just what those new modes are.
> 
> Hint bits, torn pages -> failed CRC. See earlier discussion:
> 
> http://archives.postgresql.org/pgsql-hackers/2009-11/msg01975.php

The patch requires that full page writes be on in order to obviate
this problem by never reading a torn page.  Instead, copy of the page
has already hit storage before the torn write occurs.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Gianni Ciolli
Date:
Subject: Autonomous subtransactions
Next
From: Jan Urbański
Date:
Subject: Re: JSON for PG 9.2