Re: Page Checksums - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Page Checksums
Date
Msg-id CA+U5nM+iq6w9+TQU7NUP5LyOzoJDppYUn61YQaerr5DY99+fNg@mail.gmail.com
Whole thread Raw
In response to Re: Page Checksums  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Page Checksums  (Andres Freund <andres@anarazel.de>)
Re: Page Checksums  (Jesper Krogh <jesper@krogh.cc>)
List pgsql-hackers
On Mon, Dec 19, 2011 at 11:10 AM, Simon Riggs <simon@2ndquadrant.com> wrote:

> The only sensible way to handle this is to change the page format as
> discussed. IMHO the only sensible way that can happen is if we also
> support an online upgrade feature. I will take on the online upgrade
> feature if others work on the page format issues, but none of this is
> possible for 9.2, ISTM.

I've had another look at this just to make sure.

Doing this for 9.2 will change the page format, causing every user to
do an unload/reload, with no provided mechanism to do that, whether or
not they use this feature.

If we do that, the hints are all in the wrong places, meaning any hint
set will need to change the CRC.

Currently, setting hints can be done while holding a share lock on the
buffer. Preventing that would require us to change the way buffer
manager works to make it take an exclusive lock while writing out,
since a hint would change the CRC and so allowing hints to be set
while we write out would cause invalid CRCs. So we would need to hold
exclusive lock on buffers while we calculate CRCs.

Overall, this will cause a much bigger performance hit than we planned
for. But then we have SSI as an option, so why not this?

So, do we have enough people in the house that are willing to back
this idea, even with a severe performance hit?  Are we willing to
change the page format now, with plans to change it again in the
future? Are we willing to change the page format for a feature many
people will need to disable anyway? Do we have people willing to spend
time measuring the performance in enough cases to allow educated
debate?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Page Checksums
Next
From: Dimitri Fontaine
Date:
Subject: Re: JSON for PG 9.2