]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add more debugging information when dropping twice pgstats entry
authorMichael Paquier <michael@paquier.xyz>
Fri, 7 Jun 2024 09:46:13 +0000 (18:46 +0900)
committerMichael Paquier <michael@paquier.xyz>
Fri, 7 Jun 2024 09:46:13 +0000 (18:46 +0900)
commitd92573adcb02564439086d1c257d7821606a3115
treef82efd53708c1f1d34133ad8000d5ea1e2468e59
parent8cfbac1492bddc6a81c1c3794355e1d7ac82e957
Add more debugging information when dropping twice pgstats entry

Floris Van Nee has reported a bug in the pgstats facility where a stats
entry already dropped would get again dropped.  This case should not
happen, still the error generated did not offer any details about the
stats entry getting dropped.

This commit improves the error message generated to inform about the
stats entry kind, database OID, object OID and refcount, which should
help to debug more the problem reported.  Bertrand Drouvot has been
independently able to reach this error path while writing a new feature,
and more details about the failure would have been helpful for
debugging.

Author: Andres Freund, Bertrand Drouvot
Discussion: https://postgr.es/m/20240505160915.6boysum4f34siqct@awork3.anarazel.de
Discussion: https://postgr.es/m/ZkM30paAD8Cr/Bix@ip-10-97-1-34.eu-west-3.compute.internal
Backpatch-through: 15
src/backend/utils/activity/pgstat_shmem.c