Re: Offline enabling/disabling of data checksums

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Offline enabling/disabling of data checksums
Date: 2018-12-27 14:53:47
Message-ID: bfa4e645-22ae-fe18-03d8-6a515c5116ae@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2018-12-27 14:55:58 Re: Offline enabling/disabling of data checksums
Previous Message Tomas Vondra 2018-12-27 14:46:48 Re: Offline enabling/disabling of data checksums