Re: Offline enabling/disabling of data checksums

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Offline enabling/disabling of data checksums
Date: 2018-12-27 14:55:58
Message-ID: CABUevEwiJVuWZ-5x6Uwa4Lmu=Z3q20knKE0qX9fCtWFqWekDdg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 27, 2018 at 3:54 PM Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
wrote:

>
>
> On 12/27/18 11:39 AM, Magnus Hagander wrote:
> >
> >
> > On Thu, Dec 27, 2018 at 2:15 AM Michael Paquier <michael(at)paquier(dot)xyz
> > <mailto:michael(at)paquier(dot)xyz>> wrote:
> >
> > On Wed, Dec 26, 2018 at 07:43:17PM +0100, Fabien COELHO wrote:
> > >> It adds an (now mandatory) --action parameter that takes either
> > verify,
> > >> enable or disable as argument.
> > >
> > > I'd rather have explicit switches for verify, enable & disable,
> > and verify
> > > would be the default if none is provided.
> >
> > Okay, noted for the separate switches. But I don't agree with the
> > point of assuming that --verify should be enforced if no switches are
> > defined. That feels like a trap for newcomers of this tool..
> >
> >
> > Defaulting to the choice that makes no actual changes to the data surely
> > is the safe choice,a nd not a trap :)
> >
> > That said, this would probably be our first tool where you switch it
> > between readonly and rewrite mode with just a switch, woudn't it? All
> > other tools are either read-only or read/write at the *tool* level, not
> > the switch level.
> >
>
> Eh? Isn't pg_rewind "modify by default" with --dry-run switch to run in
> a read-only mode. So I'm not sure what you mean by "tool level" here.
>
> FWIW I'd prefer sticking to the same approach for this tool too, i.e.
> have a "dry-run" switch that makes it read-only. IMHO that's pretty
> common pattern.
>

That's a different thing.

pg_rewind in dry-run mode does the same thing, except it doesn't actually
do it, it just pretends.

Verifying checksums is not the same as "turn on checksums except don't
actually do it" or "turn off checksums except don't actually do it".

--
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

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2018-12-27 16:19:51 Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)
Previous Message Tomas Vondra 2018-12-27 14:53:47 Re: Offline enabling/disabling of data checksums