Re: Online enabling of checksums

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Online enabling of checksums
Date: 2018-03-20 09:46:29
Message-ID: CABUevEyF+4m_-mnYTDbn_SK-yLQTJLOWmnzFa8VuuzBmgFOwhQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 20, 2018 at 10:29 AM, Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
wrote:

> Hi!
>
> > 19 марта 2018 г., в 11:27, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
> написал(а):
> >
> > Is there no way to stop the checksum helper once it's started? That
> seems rather user-unfriendly. I can imagine it being a pretty common
> mistake to call pg_enable_data_checksums() on a 10 TB cluster, only to
> realize that you forgot to set the cost limit, and that it's hurting
> queries too much. At that point, you want to abort.
> I've tried to pg_cancel_backend() and it worked.
> But only if I cancel "checksum helper launcher" and then "checksum helper
> worker". If I cancel helper first - it spawns new.
>
> Magnus, Daniel, is it safe to cancel worker or launcher?
>

It should be perfectly safe yes. However, it's not very user friendly,
because you have to go around and cancel both (meaning you actually have to
cancel them in the right order, or a new one will be launched).

Daniel is working on a proper way to stop things.

>
> BTW, I have some questions on pg_verify_chechsums.
> It does not check catalog version. It it true that it will work for any?
>

Yes. The actual page format for checksums has not changed since checksums
were introduced. I have successfully used it to validate checksums on v10
clusters for example.

> Also, pg_verify_chechsums will stop on short reads. But we do not stop on
> wrong checksum, may be we should not stop on short reads either?
>

These are very different scenarios though -- it's explicitly intended to
validate checksums, and short reads is a different issue. I prefer the way
it does it now, but I am not strongly locked into that position and can be
convinced otherwise :)

--
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 Andrew Gierth 2018-03-20 10:02:27 Re: PostgreSQL 10: Segmentation fault when using GROUPING SETS with all unsortable columns
Previous Message Rushabh Lathia 2018-03-20 09:36:29 Re: INOUT parameters in procedures