Re: Checksums, state of play

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Checksums, state of play
Date: 2012-03-06 19:24:35
Message-ID: 20120306192435.GE1347@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 06, 2012 at 01:52:31PM -0500, Bruce Momjian wrote:
> On Tue, Mar 06, 2012 at 06:00:13PM +0000, Simon Riggs wrote:
> > On Tue, Mar 6, 2012 at 5:50 PM, Bruce Momjian <bruce(at)momjian(dot)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.
>
> How would we know there are not old unwritten pages sitting around?

Perhaps a full xid wrap-around would allow us to re-use checksum
counters.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-03-06 19:27:35 Re: Checksums, state of play
Previous Message Tom Lane 2012-03-06 19:11:55 Re: logging in high performance systems.