Re: Offline enabling/disabling of data checksums - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Offline enabling/disabling of data checksums
Date
Msg-id CABUevEyUaB=Ws=DW-XsBw4ibDXZhQZ8d3WR4485bkmm13kTGVw@mail.gmail.com
Whole thread Raw
In response to Re: Offline enabling/disabling of data checksums  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Offline enabling/disabling of data checksums  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers


On Sat, Dec 22, 2018 at 12:28 AM Michael Paquier <michael@paquier.xyz> wrote:
On Fri, Dec 21, 2018 at 09:16:16PM +0100, Michael Banck wrote:

I think that this is independently useful, I got this stuff part of an
upgrade workflow where the user is ready to accept some extra one-time
offline time so as checksums are enabled.

Very much so, IMHO.


> Things I have not done so far:
>
> 1. Rename pg_verify_checksums to e.g. pg_checksums as it will no longer
> only verify checksums.

Check.  That sounds right to me.

Should we double-check with packagers that this won't cause a problem? Though the fact that it's done in a major release should make it perfectly fine I think -- and it's a smaller change than when we did all those xlog->wal changes...


> 3. Once that patch is in, there would be a way to disable checksums so
> there'd be a case to also change the initdb default to enabled, but that
> required further discussion (and maybe another round of benchmarks).

Perhaps, that's unrelated to this thread though.  I am not sure that
all users would be ready to pay the extra cost of checksums enabled by
default.

I'd be a strong +1 for changing the default once we have a painless way to turn them off.

It remains super-cheap to turn them off (stop database, one command, turn them on). So those people that aren't willing to pay the overhead of checksums, can very cheaply get away from it.

It's a lot more expensive to turn them on once your database has grown to some size (definitely in offline mode, but also in an online mode when we get that one in).

Plus, the majority of people *should* want them on :) We don't run with say synchronous_commit=off by default either to make it easier on those that don't want to pay the overhead of full data safety :P (I know it's not a direct match, but you get the idea)

--

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Offline enabling/disabling of data checksums
Next
From: Magnus Hagander
Date:
Subject: Re: tickling the lesser contributor's withering ego