From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add options to enable and disable checksums in pg_checksums
Date: Fri, 22 Mar 2019 23:15:16 +0000
Message-ID: <E1h7TNc-0007uP-LC@gemulon.postgresql.org> (raw)
Add options to enable and disable checksums in pg_checksums
An offline cluster can now work with more modes in pg_checksums:
- --enable enables checksums in a cluster, updating all blocks with a
correct checksum, and updating the control file at the end.
- --disable disables checksums in a cluster, updating only the control
file.
- --check is an extra option able to verify checksums for a cluster, and
the default used if no mode is specified.
When running --enable or --disable, the data folder gets fsync'd for
durability, and then it is followed by a control file update and flush
to keep the operation consistent should the tool be interrupted, killed
or the host unplugged. If no mode is specified in the options, then
--check is used for compatibility with older versions of pg_checksums
(named pg_verify_checksums in v11 where it was introduced).
Author: Michael Banck, Michael Paquier
Reviewed-by: Fabien Coelho, Magnus Hagander, Sergei Kornilov
Discussion: https://postgr.es/m/20181221201616.GD4974@nighthawk.caipicrew.dd-dns.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ed308d78379008b2cebca30a986f97f992ee6122
Modified Files
--------------
doc/src/sgml/ref/pg_checksums.sgml | 79 ++++++++++++++-
src/bin/pg_checksums/pg_checksums.c | 175 +++++++++++++++++++++++++++++-----
src/bin/pg_checksums/t/002_actions.pl | 76 ++++++++++++---
src/tools/pgindent/typedefs.list | 1 +
4 files changed, 285 insertions(+), 46 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add options to enable and disable checksums in pg_checksums
In-Reply-To: <E1h7TNc-0007uP-LC@gemulon.postgresql.org>
References: <E1h7TNc-0007uP-LC@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox