Re: Offline enabling/disabling of data checksums
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Banck <michael.banck@credativ.de>, Postgres hackers <pgsql-hackers@postgresql.org>
Date: 2018-12-27T01:15:34Z
Lists: pgsql-hackers
On Wed, Dec 26, 2018 at 07:43:17PM +0100, Fabien COELHO wrote: >> It adds an (now mandatory) --action parameter that takes either verify, >> enable or disable as argument. > > I'd rather have explicit switches for verify, enable & disable, and verify > would be the default if none is provided. Okay, noted for the separate switches. But I don't agree with the point of assuming that --verify should be enforced if no switches are defined. That feels like a trap for newcomers of this tool.. > For enable/disable, while the command is running, it should mark the cluster > as opened to prevent an unwanted database start. I do not see where this is > done. You have pretty much the same class of problems if you attempt to start a cluster on which pg_rewind or the existing pg_verify_checksums is run after these have scanned the control file to make sure that they work on a cleanly-stopped instance. In short, this is a deal between code simplicity and trying to have the tool outsmart users in the way users use the tool. I tend to prefer keeping the code simple and not worry about cases where the users mess up with their application, as there are many more things which could go wrong. -- Michael
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