Re: Offline enabling/disabling of data checksums
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Michael Banck <michael.banck@credativ.de>
Cc: Magnus Hagander <magnus@hagander.net>, Fabien COELHO <coelho@cri.ensmp.fr>, Sergei Kornilov <sk@zsrv.org>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-18T08:13:01Z
Lists: pgsql-hackers
Attachments
- 0001-Add-options-to-enable-and-disable-checksums-in-pg_ch.patch (text/x-diff) patch 0001
On Fri, Mar 15, 2019 at 01:37:27PM +0100, Michael Banck wrote: > Am Freitag, den 15.03.2019, 21:23 +0900 schrieb Michael Paquier: >> Perhaps having them under --verbose makes more sense? > > Well if we think it is essential in order to tell the user what happened > in the case of an error, it shouldn't be verbose I guess. I would still keep them to be honest. I don't know, if others find the tool too chatty we could always rework that part and tune it. Please find attached an updated patch set, I have rebased that stuff on top of my recent commits to refactor the control file updates. While reviewing, I have found a problem in the docs (forgot a <para> markup previously), and there was a problem with the parent path fsync causing an interruption to not return the correct error code, and actually we should just use durable_rename() in this case (if --no-sync gets in then pg_mv_file() should be used of course). I have also been thinking about what we could add in the documentation, so this version adds a draft to describe the cases where enabling checksums can lead to corruption when involving multiple nodes in a cluster and tools doing physical copy of relation blocks. I have not done the --no-sync part yet on purpose, as that will most likely conflict based on the feedback received for this version.. -- 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