model-writtenrun 4985 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yugo Nagata reported that pipelined CREATE DATABASE or DROP DATABASE followed by an error could roll back catalog changes while leaving filesystem changes behind, including a database whose directory had disappeared #1.
- David G. Johnston explained that the commands expected an immediate commit, while extended-protocol execution waited for Sync; Tom Lane proposed setting a transaction flag in PreventInTransactionBlock() instead of maintaining a static list of affected commands #4 #5.
- David questioned the transaction boundaries and the treatment of earlier pipeline commands, while Tom explained that omitting Sync intentionally groups commands and rejected committing before restricted commands because their restrictions are discovered during execution and existing failure semantics would change #6 #8 #10 #12.
- Tom added pipelining documentation and a simple-query assertion, then refined the documentation with David's feedback and acceptance; f92944137c landed the code from #10 with documentation edits and was backpatched #14 #15 #16.
- Yugo then identified that ANALYZE could commit earlier pipeline commands and that the fix newly forced commits even for single-table ANALYZE; his follow-up patch started an implicit transaction block on subsequent Execute messages and removed IsInTransactionBlock()'s immediate-commit side effect #17.
- Tom rejected that approach over backward compatibility and possible extension dependencies on equivalent guarantees from IsInTransactionBlock() and PreventInTransactionBlock(), leaving the behavior unchanged at that stage #18.
- Yugo proposed documenting those guarantees in function comments while continuing to flag the difficulty of explaining ANALYZE's internal commits; he later resent the comment patch to pgsql-hackers for Commitfest consideration #20 #21.
- Tom rewrote the comments to focus on caller guarantees, and Yugo accepted that wording while separately proposing user-facing warnings about internal commits and a libpq-to-protocol cross-reference #22 #23.
- The comment patch from #22 landed unchanged as e613ace1f0, credited to Yugo and Tom; Tom initially declined the separate documentation changes because he regarded internal commits as statement behavior rather than protocol behavior #24.
- Peter Eisentraut reported a concrete regression: creating an ON COMMIT DROP temporary table, analyzing it, and querying it in one pipeline now lost the table before the query; Tom proposed recognizing an outstanding Execute as a transaction block, and Yugo revived his earlier implicit-block proposal #25 #26 #28.
- Tom replaced Yugo's approach with XACT_FLAGS_PIPELINING, checked directly by both transaction-block helpers, and removed IsInTransactionBlock()'s forced commit; he also considered restricting rejection to pipelines with earlier data modifications to reduce compatibility risks #29.
- Yugo withdrew his implicit-block alternative, endorsed Tom's replacement, and requested matching documentation; Israel Barth Rubio reproduced the customer regression and verified the replacement fixed it, and Peter confirmed that this addressed their shared case #30 #31 #33.
- Tom committed #29 as 20432f8731 with documentation updates, including the libpq cross-reference proposed in #23, and backpatched it to supported branches; he omitted the data-modification exception because it complicated the user-visible rule #35.
- At the final message, the original consistency fix, explanatory comments, and ANALYZE regression fix had landed; the implicit-transaction-block implementation and proposed internal-commit warning were superseded by the explicit pipeline flag and documentation of the resulting restrictions #17 #23 #29 #35.