model-writtenrun 5395 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported that extended-statistics collection delayed instance shutdown in #1; Michael Paquier urged careful placement of interrupt checks in #2, while Tom Lane and Robert Haas supported adding checks to restore responsiveness in #3 and #4.
- Justin supplied reproductions and an inline patch checking higher-level statistics loops in #5, then demonstrated a roughly 25-second MCV sort and proposed checking the shared comparator instead in #6; he also concluded that vacuum_delay_point() was inappropriate for those loops.
- Michael questioned checks inside a sorting comparator in #7, but Justin emphasized the long unresponsive interval and attached the comparator-level fix in #8.
- Tom found that substantial time elapsed before the patched comparator was reached and proposed enabling interrupt checks in backend qsort implementations in #9; Justin confirmed that this fixed his examples for all three extended-statistics types in #10.
- Tom initially proposed using the broad fix on the development branch and Justin’s narrower fix on older branches in #11, but Andres warned about state corruption in #12, and Tom identified an unsafe persistent GUC-array sort and proposed a separate opt-in API in #13.
- Michael and Thomas Munro endorsed the separate API in #15 and #16; Tom then attached qsort_interruptible() and converted statistics-collection callers in #17, leaving other callers for future demonstrated needs or closer analysis.
- Tom committed #17 unchanged as e64cdab003, with backpatching through PostgreSQL 14, and announced the push in #18.
- After the commit, Zhihong Yu proposed adding a copyright header to the new file in #19; Tom responded that the existing qsort source files lacked such headers too in #20, leaving the main fix landed and the header addition unaccepted in the visible thread.