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-08-01T17:11:34Z
Lists: pgsql-hackers

Attachments

On Tue, Jul 30, 2024 at 08:53:48AM +0000, Bertrand Drouvot wrote:
> Did a quick check and still LGTM.

Applied 0003 for now to add the redo LSN to the pgstats file, adding
the redo LSN to the two DEBUG2 entries when reading and writing while
on it, that I forgot.  (It was not 01:57 where I am now.)

Attached is the last one.
--
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