Re: 16-bit page checksums for 9.2 - Mailing list pgsql-hackers

From Aidan Van Dyk
Subject Re: 16-bit page checksums for 9.2
Date
Msg-id CAC_2qU8yPe-rH+xhExiLek09+o20+vQCD47LkZt_-99zFnyprA@mail.gmail.com
Whole thread Raw
In response to Re: 16-bit page checksums for 9.2  (Merlin Moncure <mmoncure@gmail.com>)
Responses Re: 16-bit page checksums for 9.2  (Aidan Van Dyk <aidan@highrise.ca>)
List pgsql-hackers
On Fri, Jan 6, 2012 at 5:17 PM, Merlin Moncure <mmoncure@gmail.com> wrote:
> On Fri, Jan 6, 2012 at 2:03 PM, Andres Freund <andres@anarazel.de> wrote:
>>> The standby can set hint bits locally that weren't set on the data it
>>> received from the master.  This will require rechecksumming and
>>> rewriting the page, but obviously we can't write the WAL records
>>> needed to protect those writes during recovery.  So a crash could
>>> create a torn page, invalidating the checksum.
>> Err. Stupid me, thanks.
>>
>>> Ignoring checksum errors during Hot Standby operation doesn't fix it,
>>> either, because eventually you might want to promote the standby, and
>>> the checksum will still be invalid.
>> Its funny. I have the feeling we all are missing a very obvious brilliant
>> solution to this...
>
> Like getting rid of hint bits?

Or even just not bothering to consider them as making buffers dirty,
so the only writes are already protected by the double-write (WAL, or
if they get some DW outside of WAL).

I think I've said it before, but I'm guessing OLTP style database
rarely have pages written that are dirty that aren't covered by real
changes (so have the FPW anyways) and OLAP type generally freeze after
loads to avoid the hint-bit-write penalty too...

a.


--
Aidan Van Dyk                                             Create like a god,
aidan@highrise.ca                                       command like a king,
http://www.highrise.ca/                                   work like a slave.


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2
Next
From: Robert Haas
Date:
Subject: Re: 16-bit page checksums for 9.2