model-writtenrun 7250 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Xing Guo reported two unsafe returns found by static analysis and proposed moving their allocations outside PL/Python PG_TRY blocks in #1; Nathan Bossart identified another return in #2, while Michael Paquier raised related PG_CATCH examples in #3.
- Andres Freund supplied a separate Clang capability-annotation prototype in #4 to diagnose exits from exception-handling blocks, explored spinlock checks in #5, and received a macOS diagnostic-quality report from Nathan in #7.
- Xing incorporated Nathan's missing return into #8 and questioned whether PG_CATCH returns were unsafe; Tom Lane explained that the exception stack was already restored there and raised other ways to exit PG_TRY in #9.
- Xing expanded his external checker to cover escaping continue, break, and goto statements and reported no additional instances in #10; Andres cautioned that returning from PG_FINALLY could skip rethrowing an error in #11, and Nathan supported stricter restrictions for future compatibility in #12.
- After a gap until May, Nathan resumed Xing's fix in #13, adding comments, an assertion, and missing trigger-argument reference-count cleanup; he retained allocation-failure NULL returns because throwing errors would undermine the existing behavior.
- Tom explained why moving assignments before PG_TRY made volatile qualifiers unnecessary in #14, prompting declaration cleanups in #16 and #17; his final review in #18 requested removal of the remaining newly added qualifier.
- Nathan committed #17 as 57d0051706 with the final qualifier removal and a redundant-initializer cleanup, credited Xing as author, and backpatched through PostgreSQL 11; he explained the final adjustment in #19.
- Although 57d0051706 also links the earlier report in thread #46742, its implementation comes from the later matching patchset #17 in this thread.
- Xing thanked Nathan for advancing the work in #20, closing the thread with the PL/Python fix landed; the commit explicitly left compile-time prevention as future work, so the diagnostic prototype from #4 remained uncommitted here.