Re: Offline enabling/disabling of data checksums
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: Andres Freund <andres@anarazel.de>
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-20T08:00:54Z
Lists: pgsql-hackers
Hallo Andres, >> [...] > > 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. Ok. My light knowledge of pg_upgrade inner working does not extend to this level of precision. >> I'd be okay with anything that works consistently accross all commands >> [...] >> >> 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. Possibly, although I'm not sure what in the above is a "separate feature", I assume from the "pg_checksum --enable" implementation. Is it the fact that there could (should, IMO) be some mechanisms to ensure that mutually exclusive direct cluster-modification commands are not run concurrently? As "pg_checksums -e" is a potentially long running command, the likelyhood of self-inflected wounds is raised significantly: I could do absurd things on an enable-checksum-in-progress cluster on a previous version of the patch. Thus as a reviewer I'm suggesting to fix the issue. Or is it the fact that fixing on some critical errors would possibly involve some manual intervention at some point? Or is it something else? -- Fabien.
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