model-writtenrun 8998 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane reported that XMLTABLE could retain references to dropped types because TableFunc dependencies were missing, supplied a reproducer and fix, and planned to commit after the imminent releases were tagged #1.
- Mark Dilger proposed compiler-checked switches over node tags and supplied an exploratory conversion, but Tom explained that its verbosity and overlapping node categories made that approach unsuitable #2 #3 #4.
- Tom Lane and Andres Freund explored generating dependency walkers from annotations, while recognizing that redundant dependencies and specialized cases would still require explicit handling; this remained future work #4 #5 #6 #7.
- Tom Lane committed the original TableFunc patch unchanged as 2c7b5dad6e, with backpatching to PostgreSQL 10 specified in the commit message #1.
- Mark Dilger subsequently reported statistics cache lookup failures under concurrent schema changes and supplied a stress-test generator; Tomas Vondra reproduced failures with multiple statistics types and identified a likely DROP STATISTICS race, which Tom Lane confirmed was separate from the TableFunc issue #8 #9 #10 #11.
- Tomas Vondra proposed locking the owning table exclusively in RemoveStatisticsById; Tom Lane questioned concurrent deletion safety, and Tomas pointed out that deletion already locks the statistics object itself #12 #13 #14.
- Alvaro Herrera suggested acquiring the table lock during statistics-object lookup, with limitations for future statistics spanning multiple relations; Tomas noted additional complications in how object names are represented #15 #17.
- After recognizing the existing statistics-object lock, Tom Lane identified opposite lock ordering between DROP STATISTICS and DROP TABLE as a deadlock risk and proposed that the planner instead acquire a shared lock on each statistics object and recheck its existence #16.
- Tomas Vondra supplied a replacement implementing planner-side statistics-object locking and skipping dropped objects; the thread ends with that separate fix awaiting further review, while the TableFunc fix had already landed #18 2c7b5dad6e.