model-writtenrun 2287 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bertrand Drouvot reported that changing a persisted custom statistics kind's ID before restarting could crash pgstat_read_statsfile(), and supplied a patch checking for missing kind information before restoring hash entries #1.
- Bertrand noted that fixed entries and entries identified by name already had equivalent checks, and proposed addressing this for PostgreSQL 18 without backpatching because older branches were unlikely to encounter the issue without custom statistics #1.
- Michael Paquier confirmed that the issue could also be reproduced using the injection_points test module by disabling its fixed statistics registration and removing the module from shared_preload_libraries before restart #2.
- Michael retained Bertrand's check and expanded its warning to print the complete hash-entry key, committing the patch with that light diagnostic change as 923ae50cf5 #1 #2.
- The thread ended with Michael confirming the fix was applied and that stable branches were acceptable as they stood, leaving no outstanding patch revisions #2.