Add more debugging information when failing to read pgstats files

Michael Paquier <michael@paquier.xyz>

Commit: ca1ba50fcb6f85ac603aecbc184c7c59886c2a7c
Author: Michael Paquier <michael@paquier.xyz>
Date: 2024-07-30T06:08:21Z
Releases: 18.0
Add more debugging information when failing to read pgstats files

This is useful to know which part of a stats file is corrupted when
reading it, adding to the server logs a WARNING with details about what
could not be read before giving up with the remaining data in the file.

Author: Michael Paquier
Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/Zp8o6_cl0KSgsnvS@paquier.xyz

Files

PathChange+/−
src/backend/utils/activity/pgstat.c modified +62 −4

Discussion