model-writtenrun 9025 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Eisentraut proposed PG_FINALLY to eliminate duplicated cleanup on success and error paths, supplying broad caller conversions but noting that its block-as-macro-argument syntax crashed pgindent #1.
- Kyotaro Horiguchi proposed a separate PG_FINALLY() block, Andrew Dunstan explained the formatting problem, and David Steele supplied a comparable TRY/FINALLY implementation #2 #3 #4.
- Peter initially argued that cleanup needed two physical expansions, but Tom Lane challenged that assumption and advocated retaining the familiar PG_TRY()/PG_END_TRY() structure #6 #7.
- After roughly ten months, Peter supplied a redesigned implementation using one cleanup block and a flag that defers rethrowing until PG_END_TRY(), replacing the original macro-argument design #8.
- Robert Haas identified possible macro-local name collisions, and Tom Lane requested underscore-prefixed names; Peter applied that naming change and committed the revised patch as 604bd36711 #9 #11 #12.
- Tom reported uninitialized-variable warnings after the landing, and Peter reproduced warnings on CentOS 6 and committed explicit initializers in five functions as a63c84e59a, without posting a separate patch #13 #14.
- Tom then discovered that PG_FINALLY ran cleanup before restoring the error stacks, allowing errors during cleanup to loop back into the same handler; Peter confirmed the failure and posted a corrective delta #15 #16.
- Tom reviewed the corrective patch and suggested removing an unnecessary else after the nonreturning rethrow; Peter made that simplification and committed 581a55889b, leaving the feature and both follow-up fixes landed at the thread's close #17 #18.