Re: 9.3: summary of corruption detection / checksums / CRCs discussion

From: Greg Stark <stark(at)mit(dot)edu>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: 9.3: summary of corruption detection / checksums / CRCs discussion
Date: 2012-04-25 00:52:22
Message-ID: CAM-w4HMaav56oOj0otbmUxLtsxo72C9tjNEEafmRegWgo3vUpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Apr 24, 2012 at 9:40 PM, Robert Haas <robertmhaas(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2012-04-25 00:57:53 Re: remove dead ports?
Previous Message Robert Haas 2012-04-25 00:22:42 Re: Timsort performance, quicksort (was: Re: Memory usage during sorting)