Page Checksums + Double Writes - Mailing list pgsql-hackers

From David Fetter
Subject Page Checksums + Double Writes
Date
Msg-id 20111221215913.GA4536@fetter.org
Whole thread Raw
Responses Re: Page Checksums + Double Writes  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Page Checksums + Double Writes  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Page Checksums + Double Writes  (Rob Wultsch <wultsch@gmail.com>)
Re: Page Checksums + Double Writes  (Florian Weimer <fweimer@bfk.de>)
List pgsql-hackers
Folks,

One of the things VMware is working on is double writes, per previous
discussions of how, for example, InnoDB does things.   I'd initially
thought that introducing just one of the features in $Subject at a
time would help, but I'm starting to see a mutual dependency.

The issue is that double writes needs a checksum to work by itself,
and page checksums more broadly work better when there are double
writes, obviating the need to have full_page_writes on.

If submitting these things together seems like a better idea than
having them arrive separately, I'll work with my team here to make
that happen soonest.

There's a separate issue we'd like to get clear on, which is whether
it would be OK to make a new PG_PAGE_LAYOUT_VERSION.

If so, there's less to do, but pg_upgrade as it currently stands is
broken.

If not, we'll have to do some extra work on the patch as described
below.  Thanks to Kevin Grittner for coming up with this :)

- Use a header bit to say whether we've got a checksum on the page. We're using 3/16 of the available bits as described
insrc/include/storage/bufpage.h.
 

- When that bit is set, place the checksum somewhere convenient on the page.  One way to do this would be to have an
optionalfield at the end of the special space based on the new bit.  Rows from pg_upgrade would have the bit clear, and
wouldhave the shorter special structure without the checksum.
 

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: Simon Riggs
Date:
Subject: Re: CLOG contention
Next
From: Alvaro Herrera
Date:
Subject: Re: Page Checksums + Double Writes