Add assertion in pgstat_write_statsfile() about processes allowed
Michael Paquier <michael@paquier.xyz>
Add assertion in pgstat_write_statsfile() about processes allowed This routine can currently only be called from the postmaster in single-user mode or the checkpointer, but there was no sanity check to make sure that this was always the case. This has proved to be useful when hacking the zone (at least to me), to make sure that the write of the pgstats file happens at shutdown, as wanted by design, in the correct process context. Discussion: https://postgr.es/m/ZnEiqAITL-VgZDoY@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/activity/pgstat.c | modified | +3 −0 |
Discussion
- Flush pgstats file during checkpoints 21 messages · 2024-06-18 → 2024-09-03