model-writtenrun 690 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bertrand Drouvot reported crashes when custom statistics functions were called without their extension being preloaded, and proposed runtime checks in eight core statistics functions to raise errors for unregistered kinds #1.
- Ewan Young identified an assertion made redundant by the new checks #2, and Bertrand removed it in the next patch #3.
- Michael Paquier argued that the test extensions should fail during initialization instead of adding defensive checks throughout core #4; Bertrand raised the impact of a crash on all connections #5, but Michael maintained that registration should fail at its source, following test_custom_rmgrs #6.
- After asking about extensions that omit registration entirely #7, Bertrand replaced the core changes with a patch removing the preload guards from both test_custom_stats modules, allowing pgstat_register_kind() to reject loading outside shared_preload_libraries #8.
- Michael explained that extensions omitting required registration are broken and approved the revised approach #9, which Bertrand accepted #10.
- Michael committed the revised patch as 5045d9ff3b, retaining its behavior while omitting the comment rewrites, and confirmed backpatching through PostgreSQL 19 #11; the extension fix landed and the proposed core checks were dropped.