Re: 16-bit page checksums for 9.2

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, stark(at)mit(dot)edu, aidan(at)highrise(dot)ca, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 16-bit page checksums for 9.2
Date: 2011-12-28 07:42:10
Message-ID: 4EFAC852.3080808@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28.12.2011 01:39, Simon Riggs wrote:
> On Tue, Dec 27, 2011 at 8:05 PM, Heikki Linnakangas
> <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>> On 25.12.2011 15:01, Kevin Grittner wrote:
>>>
>>> I don't believe that. Double-writing is a technique to avoid torn
>>> pages, but it requires a checksum to work. This chicken-and-egg
>>> problem requires the checksum to be implemented first.
>>
>>
>> I don't think double-writes require checksums on the data pages themselves,
>> just on the copies in the double-write buffers. In the double-write buffer,
>> you'll need some extra information per-page anyway, like a relfilenode and
>> block number that indicates which page it is in the buffer.
>
> How would you know when to look in the double write buffer?

You scan the double-write buffer, and every page in the double write
buffer that has a valid checksum, you copy to the main storage. There's
no need to check validity of pages in the main storage.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-12-28 09:00:02 Re: Page Checksums
Previous Message Magnus Hagander 2011-12-28 06:55:44 Re: Review of VS 2010 support patches