Re: 9.3: summary of corruption detection / checksums / CRCs discussion - Mailing list pgsql-hackers

From Greg Stark
Subject Re: 9.3: summary of corruption detection / checksums / CRCs discussion
Date
Msg-id CAM-w4HMaav56oOj0otbmUxLtsxo72C9tjNEEafmRegWgo3vUpw@mail.gmail.com
Whole thread Raw
In response to Re: 9.3: summary of corruption detection / checksums / CRCs discussion  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: 9.3: summary of corruption detection / checksums / CRCs discussion  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Tue, Apr 24, 2012 at 9:40 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>  For three things, index pages
> have hint-type changes that are not single-bit changes.

? Just how big are these? Part of the reason hint bit updates are safe
is because one bit definitely absolutely has to be entirely in one
page. You can't tear a page in the middle of a bit. In reality the
size is much larger, probably 4k and almost certainly at least 512
bytes. But the postgres block layout doesn't really offer much
guarantees about the location of anything relative those 512 byte
blocks so probably anything larger than a word is unsafe to update.

The main problem with the approach was that we kept finding more hint
bits we had forgotten about. Once the coding idiom was established it
seems it was a handy hammer for a lot of problems.
--
greg


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Timsort performance, quicksort (was: Re: Memory usage during sorting)
Next
From: Greg Stark
Date:
Subject: Re: remove dead ports?