Re: Block-level CRC checks - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Block-level CRC checks
Date
Msg-id 877i8qsk0i.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Block-level CRC checks  ("Dawid Kuroczko" <qnex42@gmail.com>)
List pgsql-hackers
"Dawid Kuroczko" <qnex42@gmail.com> writes:

> On Thu, Oct 2, 2008 at 7:42 PM, Jonah H. Harris <jonah.harris@gmail.com> wrote:
>
> if checksum mismatch {
>     flip the hint bits [1]

I did try to make something like that work. But I didn't get anywhere. There
could easily be dozens of bits to flip. The MaxHeapTuplesPerPage is over 200
and you could easily have half of them that don't match the checksum if the
writes happen in 4k chunks. If they happen in 512b chunks then you could have
a lot more. And yes they could easily have all been set at around the same
time because that's often just what a sequential scan does.

And you can't even just set the bits to their "correct" values either before
the checksum or before checking the checksum since the "correct" value changes
over time. By the time you compare the checksum more bits will be settable
than when the page was stored.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support!


pgsql-hackers by date:

Previous
From: Decibel!
Date:
Subject: Re: Block-level CRC checks
Next
From: Simon Riggs
Date:
Subject: Re: Transaction Snapshots and Hot Standby