Re: Enabling Checksums - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Enabling Checksums
Date
Msg-id 8385.1363716473@sss.pgh.pa.us
Whole thread Raw
In response to Re: Enabling Checksums  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> I will move back to verifying the page hole, as well.

> There are a few approaches:

> 1. Verify that the page hole is zero before write and after read.
> 2. Include it in the calculation (if we think there are some corner
> cases where the hole might not be all zero).
> 3. Zero the page hole before write, and verify that it's zero on read.
> This can be done during the memcpy at no performance penalty in
> PageSetChecksumOnCopy(), but that won't work for
> PageSetChecksumInplace().

TBH, I do not think that the checksum code ought to be so familiar with
the page format as to know that there *is* a hole, much less be willing
to zero out what it thinks is a hole.  I consider #3 totally
unacceptable from a safety standpoint, and don't much care for #1
either.  #2 sounds like the thing to do.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Improving avg performance for numeric
Next
From: Greg Smith
Date:
Subject: Re: Enabling Checksums