Re: Checksums, state of play - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Checksums, state of play
Date
Msg-id CA+U5nMJSg_VOQY=D_hPmSBkj9gT2j2-+he9AV+Zmvciunyg_7w@mail.gmail.com
Whole thread Raw
In response to Re: Checksums, state of play  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Checksums, state of play  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Tue, Mar 6, 2012 at 5:50 PM, Bruce Momjian <bruce@momjian.us> wrote:

> One crazy idea would be to have a checksum _version_ number somewhere on
> the page and in pg_controldata.  When you turn on checksums, you
> increment that value, and all new checksum pages get that checksum
> version;  if you turn off checksums, we just don't check them anymore,
> but they might get incorrect due to a hint bit write and a crash.  When
> you turn on checksums again, you increment the checksum version again,
> and only check pages having the _new_ checksum version.
>
> Yes, this does add additional storage requirements for the checksum, but
> I don't see another clean option.  If you can spare one byte, that gives
> you 255 times to turn on checksums;   after that, you have to
> dump/reload to use the checksum feature.

I like the idea very much actually. But I'll let you argue the case
for using pd_pagesize_version for that with your esteemed colleagues.

It would be pretty safe to just let it wrap.

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


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: elegant and effective way for running jobs inside a database
Next
From: Tom Lane
Date:
Subject: Re: Checksums, state of play