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-26T04:56:40Z
Lists: pgsql-hackers

Attachments

On Fri, Aug 02, 2024 at 02:11:34AM +0900, Michael Paquier wrote:
> 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.

The CF bot has been complaining in injection_points as an effect of
the stats remaining after a crash, so rebased to adapt to that.
--
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