Re: Flush pgstats file during checkpoints

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Konstantin Knizhnik <knizhnik@garret.ru>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-07-17T03:08:01Z
Lists: pgsql-hackers
On Fri, Jul 12, 2024 at 12:10:26PM +0000, Bertrand Drouvot wrote:
> Looking at 0001:
> 
> +               /* error logged already */
> 
> Maybe mention it's already logged by durable_rename() (like it's done in
> InstallXLogFileSegment(), BaseBackup() for example).
> 
> Except this nit, 0001 LGTM.

Tweaked the comment, and applied 0001 for durable_rename().  Thanks
for the review.
--
Michael

Commits

  1. Add redo LSN to pgstats files

  2. Add more debugging information when failing to read pgstats files

  3. Make write of pgstats file durable at shutdown

  4. Add assertion in pgstat_write_statsfile() about processes allowed