Re: Enabling Checksums - Mailing list pgsql-hackers

From Stephen Frost
Subject Re: Enabling Checksums
Date
Msg-id 20130318182553.GW4361@tamriel.snowman.net
Whole thread Raw
In response to Re: Enabling Checksums  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
* Bruce Momjian (bruce@momjian.us) wrote:
> With a potential 10-20% overhead, I am unclear who would enable this at
> initdb time.

I'd expect that quite a few people would, myself included on a brand new
DB that I didn't have any reason to think would need to be
super-performant.

> I assume a user would wait until they suspected corruption to turn it
> on, and because it is only initdb-enabled, they would have to
> dump/reload their cluster.  The open question is whether this is a
> usable feature as written, or whether we should wait until 9.4.

It's absolutely useful as an initdb-only option.  If we want to worry
about users who will see corruption and who will wait until then to want
to turn on this feature, then we should just enable it by default.

> pg_upgrade can't handle this because the old/new clusters would have the
> same catalog version number and the tablespace directory names would
> conflict.

pg_upgrade would just need to complain and exit if someone tried to go
from a non-checksum DB to a DB which was initdb'd with checksums, right?
I don't see pg_upgrade being able to convert from one to the other.
Users can use pg_dump/restore for that..

> Even if they are not using tablespaces, the old heap/index
> files would not have checksums and therefore would throw an error as
> soon as you accessed them.  In fact, this feature is going to need
> pg_upgrade changes to detect from pg_controldata that the old/new
> clusters have the same checksum setting.

Right, but that's it, imv.
Thanks,
    Stephen

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Enabling Checksums
Next
From: Josh Berkus
Date:
Subject: Re: Enabling Checksums