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

From Dawid Kuroczko
Subject Re: Block-level CRC checks
Date
Msg-id 758d5e7f0810021451m3f5adcb8s639a0e97deecd687@mail.gmail.com
Whole thread Raw
In response to Re: Block-level CRC checks  ("Jonah H. Harris" <jonah.harris@gmail.com>)
Responses Re: Block-level CRC checks
List pgsql-hackers
On Thu, Oct 2, 2008 at 7:42 PM, Jonah H. Harris <jonah.harris@gmail.com> wrote:
>> It's not the buffeting it's the checksum. The problem arises if a page is
>> read in but no wal logged modifications are done against it. If a hint bit
>> is modified it won't be wal logged but the page is marked dirty.
>
> Ahhhhh.  Thanks Greg.  Let me look into this a bit before I respond :)

Hmm, how about, when reading a page:

read the page
if checksum mismatch {   flip the hint bits [1]   if checksum mismatch {         ERROR   } else {         emit a
warning,'found a torn page'   }
 
}

...that is assuming we know which bit to flip
and that we accept the check will be a bit
weaker. :)  OTOH this shouldn't happen too
often, so performance should matter much.

My 0.02
  Best regards,     Dawid Kuroczko

[1]: Of course it would be more efficient to flip
the checksum, but it would be tricky. :)
--  ..................        ``The essence of real creativity is a certain: *Dawid Kuroczko* :         playfulness, a
flittingfrom idea to idea: qnex42@gmail.com :     without getting bogged down by fixated demands.''`..................'
Sherkaner Underhill, A Deepness in the Sky, V. Vinge
 


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Block-level CRC checks
Next
From: Simon Riggs
Date:
Subject: Re: [PATCHES] Infrastructure changes for recovery