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

From Greg Sabino Mullane
Subject Re: Speed up pg_checksums in cases where checksum already set
Date
Msg-id CAKAnmmKhxLgEUFHEOrw06W+=NAVvZvR6-L+qybneZj8bjxmg=w@mail.gmail.com
Whole thread Raw
In response to Re: Speed up pg_checksums in cases where checksum already set  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Speed up pg_checksums in cases where checksum already set
List pgsql-hackers
On Fri, Jun 18, 2021 at 1:57 AM Michael Paquier <michael@paquier.xyz> wrote:
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."

Agreed, I like that wording. New patch attached.
 
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)?

I don't know that we need to bother: the default is already to sync and one has to go out of one's way using the -N argument to NOT sync, so I think it's a pretty safe assumption to everyone (except those who read my first version of my patch!) that syncing always happens.

Cheers,
Greg
 
Attachment

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgbench logging broken by time logic changes
Next
From: Mark Dilger
Date:
Subject: Re: Optionally automatically disable logical replication subscriptions on error