Re: Offline enabling/disabling of data checksums
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Banck <michael.banck@credativ.de>, Michael Paquier <michael@paquier.xyz>, Magnus Hagander <magnus@hagander.net>, Sergei Kornilov <sk@zsrv.org>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-20T07:01:34Z
Lists: pgsql-hackers
Hi, On 2019-03-20 07:55:39 +0100, Fabien COELHO wrote: > > And you're basically adding it because Fabien doesn't like > > postmaster.pid and wants to invent another lockout mechanism in this > > thread. > > I did not suggest to rename the control file, but as it is already done by > another command it did not look like a bad idea in itself, or at least an > already used bad idea:-) pg_upgrade in link mode intentionally wants to *permanently* disable a cluster. And it explicitly writes a log message about it. That's not a case to draw inferrence for this case. > I'd be okay with anything that works consistently accross all commands that > may touch a cluster and are mutually exclusive (postmater, pg_rewind, > pg_resetwal, pg_upgrade, pg_checksums…), without underlying race conditions. > It could be locking, a control file state, a special file (which one ? what > is the procedure to create/remove it safely and avoid potential race > conditions ?), possibly "postmaster.pid", whatever really. > > I'll admit that I'm moderately enthousiastic about "posmaster.pid" because > it does not do anymore what the file names says, but if it really works and > is used consistently by all commands, why not. In case of unexpected > problems, the file will probably have to be removed/fixed by hand. I also > think that the implemented mechanism should be made available in > "control_utils.c", not duplicated in every command. That's just a separate feature. Greetings, Andres Freund
Commits
-
Reorganize Notes section in documentation of pg_checksums
- a7cc52370b2b 12.0 landed
-
Add option -N/--no-sync to pg_checksums
- e0090c869008 12.0 landed
-
Add options to enable and disable checksums in pg_checksums
- ed308d783790 12.0 landed
-
Refactor more code logic to update the control file
- 8b938d36f744 12.0 landed
-
Rename pg_verify_checksums to pg_checksums
- 6dd263cfaa84 12.0 landed
-
Fix cross-version compatibility checks of pg_verify_checksums
- 501f58359b59 11.3 landed
- c9ae7f704c67 12.0 landed
-
Add routine able to update the control file to src/common/
- ce6afc6823fb 12.0 landed