Re: Offline enabling/disabling of data checksums

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Michael Banck <michael(dot)banck(at)credativ(dot)de>, Postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Offline enabling/disabling of data checksums
Date: 2018-12-27 10:43:02
Message-ID: CABUevEyUaB=Ws=DW-XsBw4ibDXZhQZ8d3WR4485bkmm13kTGVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Dec 22, 2018 at 12:28 AM Michael Paquier <michael(at)paquier(dot)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)

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2018-12-27 10:53:18 Re: tickling the lesser contributor's withering ego
Previous Message Magnus Hagander 2018-12-27 10:39:36 Re: Offline enabling/disabling of data checksums