Re: Speed up pg_checksums in cases where checksum already set - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Speed up pg_checksums in cases where checksum already set
Date
Msg-id YMw1vhroiRNgq/Tc@paquier.xyz
Whole thread Raw
In response to Re: Speed up pg_checksums in cases where checksum already set  (Greg Sabino Mullane <htamfids@gmail.com>)
Responses Re: Speed up pg_checksums in cases where checksum already set
List pgsql-hackers
On Wed, Jun 02, 2021 at 05:09:36PM -0400, Greg Sabino Mullane wrote:
> Newer version attach that adds a small documentation tweak as well.

-   enabling checksums, every file in the cluster is rewritten in-place.
+   enabling checksums, every file in the cluster with a changed checksum is
+   rewritten in-place.

This doc addition is a bit confusing, as it could mean that each file
has just one single checksum.  We could be more precise, say:
"When enabling checksums, each relation file block with a changed
checksum is rewritten in place."

Should we also mention that the sync happens even if no blocks are
rewritten based on the reasoning of upthread (aka we'd better do the
final flush as an interrupted pg_checksums may let a portion of the
files as not flushed)?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: Unresolved repliaction hang and stop problem.
Next
From: Peter Smith
Date:
Subject: Re: Optionally automatically disable logical replication subscriptions on error