From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Optimize pg_checksums --enable where checksum is already set
Date: Wed, 30 Jun 2021 00:59:39 +0000
Message-ID: <E1lyOZn-0003jB-79@gemulon.postgresql.org> (raw)
Optimize pg_checksums --enable where checksum is already set
This commit prevents pg_checksums to do a rewrite of a block if it has
no need to, in the case where the computed checksum matches with what's
already stored in the block read. This is helpful to accelerate
successive runs of the tool when the previous ones got interrupted, for
example.
The number of blocks and files written is tracked and reported by the
tool once finished. Note that the final flush of the data folder
happens even if no blocks are written, as it could be possible that a
previous interrupted run got stopped while doing a flush.
Author: Greg Sabino Mullane
Reviewed-by: Paquier Michael, Julien Rouhaud
Discussion: https://postgr.es/m/CAKAnmmL+k6goxmVzQJB+0bAR0PN1sgo6GDUXJhyhUmVMze1QAw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4c9f50d116461617848601e97dbc6f122b0a6f14
Modified Files
--------------
doc/src/sgml/ref/pg_checksums.sgml | 3 ++-
src/bin/pg_checksums/pg_checksums.c | 36 ++++++++++++++++++++++++++++++------
2 files changed, 32 insertions(+), 7 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: Optimize pg_checksums --enable where checksum is already set
In-Reply-To: <E1lyOZn-0003jB-79@gemulon.postgresql.org>
References: <E1lyOZn-0003jB-79@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