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-10 20:27:19
Message-ID: D4104CB6-AC98-4DD7-935A-CE4E0443253B@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 10 Apr 2018, at 06:21, Michael Paquier <michael(at)paquier(dot)xyz> wrote:

> 1) The documentation states that the cluster needs to be offline.
> Doesn't this imply that the cluster can also be forcibly killed? It
> seems to me that the documentation ought to say that the cluster needs
> to be shut down cleanly instead. Mentioning that only in the notes of
> the documentation would be enough in my opinion.

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. That being said, you’re absolutely right
that the current wording isn’t great, I think “The cluster must be shut down
before running..” would be better.

> 2) On a cluster where checksums are disabled, aka the control file says
> so, then using --force does not result in incorrect blocks to be
> reported. This is caused by the presence of the check on
> PG_DATA_CHECKSUM_VERSION which does not match for a cluster where
> checksums have been disabled. Wouldn't one want to know this
> information as well to know what are the portions of the data folder not
> treated yet by checksum updates?
> 3) Is the force option actually useful? I assume that --force is useful
> if one wants to check how checksums are computed if a switch off -> on
> is used to see the progress of the operation or to see how much progress
> has been done after doing an online switch, which is also what a228cc13
> outlines. Still this requires the cluster to be offline…

Thinking more on this, I don’t think the -f option should be in the tool until
we have the ability to turn on/off checksums. Since checksums are always on,
or always off, -f is at best confusing IMO. The attached patch removes -f,
when we can turn checksums on/off we can rethink how -f should behave.

cheers ./daniel

Attachment Content-Type Size
remove_force.patch application/octet-stream 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Kuzmenkov 2018-04-10 20:31:47 Re: Reopen logfile on SIGHUP
Previous Message Tom Lane 2018-04-10 20:13:23 Re: submake-errcodes