Re: Gotchas about pg_verify_checksums

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>
Subject: Re: Gotchas about pg_verify_checksums
Date: 2018-04-11 20:21:29
Message-ID: 50254E5A-DEEB-45E0-B30D-FAFD403B406F@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 11 Apr 2018, at 01:53, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Tue, Apr 10, 2018 at 10:27:19PM +0200, Daniel Gustafsson wrote:
>>> On 10 Apr 2018, at 06:21, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>> Does it really imply that? Either way, the tool could potentially be useful
>> for debugging a broken cluster so I’m not sure that stating it requires a
>> cleanly shut down server is useful.
>
> Torn pages could lead to false positives. So I think that the tool's
> assumptions are right.

Right, I misunderstood your initial email but I see what you mean. Yes, you
are right and with that +1 on your patch.

> I am wondering as well if we should not actually rename the tool? Why
> not naming it pg_checksums instead of pg_verify_checksums, and add an
> --action switch to it which can be used to work on checksums. The
> obvious option to support in v11 is a "verify" mode, but I would imagine
> that a "disable" and "enable" modes would be useful as well, and all the
> APIs are here already to be able to do an in-place update of the
> checksums, and then switch the control file properly. We have no idea
> at this stage if a patch to enable checksums while the cluster is online
> will be able to make it, still a way to switch checksums while the
> cluster is offline is both reliable and easy to implement. Not saying
> do to that for v11 of course, I would like to keep the door open for
> v12.

Naming it pg_checksums, with only verification as an option, seems to me to
imply future direction for 12 more than what pg_verify_checksums does. I would
leave it the way it is, but I don’t have very strong opinions (or any plans on
hacking on offline checksum enabling for that matter).

cheers ./daniel

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-04-11 20:24:14 Re: Problem while setting the fpw with SIGHUP
Previous Message Simon Riggs 2018-04-11 20:12:57 Re: Bugs in TOAST handling, OID assignment and redo recovery