Re: Speed up pg_checksums in cases where checksum already set

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Greg Sabino Mullane <htamfids(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Justin Pryzby <pryzby(at)telsasoft(dot)com>
Subject: Re: Speed up pg_checksums in cases where checksum already set
Date: 2021-06-18 05:57:18
Message-ID: YMw1vhroiRNgq/Tc@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-06-18 06:34:47 Re: Optionally automatically disable logical replication subscriptions on error
Previous Message Kyotaro Horiguchi 2021-06-18 05:52:23 Re: Unresolved repliaction hang and stop problem.