Re: Offline enabling/disabling of data checksums
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: Michael Banck <michael.banck@credativ.de>
Cc: Michael Paquier <michael@paquier.xyz>,
Fabien COELHO <coelho@cri.ensmp.fr>, Sergei Kornilov <sk@zsrv.org>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2019-03-15T09:01:32Z
Lists: pgsql-hackers
On Thu, Mar 14, 2019 at 4:26 PM Michael Banck <michael.banck@credativ.de> wrote: > Hi, > > Am Donnerstag, den 14.03.2019, 15:26 +0100 schrieb Magnus Hagander: > > Given that the failure is data corruption, I don't think big fat > > warning is enough. We should really make it impossible to start up the > > postmaster by mistake during the checksum generation. People don't > > read the documentation until it's too late. And it might not even be > > under their control - some automated tool might go in and try to start > > postgres, and boom, corruption. > > I guess you're right. > > > One big-hammer method could be similar to what pg_upgrade does -- > > temporarily rename away the controlfile so postgresql can't start, and > > when done, put it back. > > That sounds like a good solution to me. I've made PoC patch for that, > see attached. > The downside with this method is we can't get a nice error message during the attempted startup. But it should at least be safe, which is the most important part. And at least it's clear what's happening once you list the files and see the name of the temporary one. //Magnus
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