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

Page Checksums + Double Writes

From: David Fetter <david(at)fetter(dot)org>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Page Checksums + Double Writes
Date: 2011-12-21 21:59:13
Message-ID: 20111221215913.GA4536@fetter.org (view raw or flat)
Thread:
Lists: 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 in
  src/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 optional field at the
  end of the special space based on the new bit.  Rows from pg_upgrade
  would have the bit clear, and would have the shorter special
  structure without the checksum.

Cheers,
David.
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)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

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2011-12-21 22:06:43
Subject: Re: Page Checksums + Double Writes
Previous:From: Simon RiggsDate: 2011-12-21 21:17:50
Subject: Re: CLOG contention

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