Re: 16-bit page checksums for 9.2 - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: 16-bit page checksums for 9.2
Date
Msg-id CA+U5nMJsnvfYE+HiPJ6J+=ktORw+gVr+gNppv4Vf5Wv_PvvSdQ@mail.gmail.com
Whole thread Raw
In response to Re: 16-bit page checksums for 9.2  (Andres Freund <andres@anarazel.de>)
Responses Re: 16-bit page checksums for 9.2  (Andres Freund <andres@anarazel.de>)
Re: 16-bit page checksums for 9.2  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Sat, Dec 24, 2011 at 3:54 PM, Andres Freund <andres@anarazel.de> wrote:
> On Saturday, December 24, 2011 03:46:16 PM Tom Lane wrote:
>> Simon Riggs <simon@2ndQuadrant.com> writes:
>> > After the various recent discussions on list, I present what I believe
>> > to be a working patch implementing 16-but checksums on all buffer
>> > pages.
>>
>> I think locking around hint-bit-setting is likely to be unworkable from
>> a performance standpoint.  I also wonder whether it might not result in
>> deadlocks.

> Why don't you use the same tricks as the former patch and copy the buffer,
> compute the checksum on that, and then write out that copy (you can even do
> both at the same time). I have a hard time believing that the additional copy
> is more expensive than the locking.

We would copy every time we write, yet lock only every time we set hint bits.

If that option is favoured, I'll write another version after Christmas.

ISTM we can't write and copy at the same time because the cheksum is
not a trailer field.

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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2
Next
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2