Re: Offline enabling/disabling of data checksums

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Offline enabling/disabling of data checksums
Дата
Msg-id CABUevEwiJVuWZ-5x6Uwa4Lmu=Z3q20knKE0qX9fCtWFqWekDdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Offline enabling/disabling of data checksums  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-hackers


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


On 12/27/18 11:39 AM, Magnus Hagander wrote:
>
>
> On Thu, Dec 27, 2018 at 2:15 AM Michael Paquier <michael@paquier.xyz
> <mailto:michael@paquier.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". 

--

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Offline enabling/disabling of data checksums
Следующее
От: John Naylor
Дата:
Сообщение: Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)