model-writtenrun 6396 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Andres Freund opened the thread with a reproducer showing that a prepared transaction holding a catalog lock can block logical decoding indefinitely, and noted that locking pg_class can also prevent new connections after restart; he proposed rejecting such prepares in #1.
- Amit Kapila considered either rejection or documentation in #2, while Andres insisted that explicit code caveats and user documentation were necessary because external logical-decoding consumers could already encounter the problem in #3 and #5.
- Amit supplied documentation and decode.c comments in #6, which landed unchanged as b4e3dc7fd4, with the push announced in #7.
- Vignesh C then proposed rejecting PREPARE after exclusive catalog locks in #8; Ajin Cherian tested the patch and requested a more precise error in #9, which Vignesh incorporated in #10.
- Vignesh demonstrated that ordinary synchronous logical replication could suffer the same deadlock in #11, and Amit broadened the investigation to CLUSTER and TRUNCATE while proposing general synchronous-decoding caveats in #12.
- Michael Paquier argued for treating the connection-lockout problem separately and strengthening catalog-lock restrictions in #14, while Takamichi Osumi reproduced the synchronous CLUSTER deadlock and confirmed that restart recovered that case in #15.
- Tom Lane warned that new restrictions could break legitimate uses despite the lack of reported failures in #18; Petr Jelinek favored documenting the limitation in #19, and Amit supported documentation and backpatching in #21, leaving Vignesh's rejection patch uncommitted.
- Peter Smith brought a small correction to the existing two-phase warning into the thread in #22, and Osumi expanded it into synchronous-decoding caveats with LOCK, CLUSTER, TRUNCATE, and prepared-transaction scenarios in #23.
- Vignesh found that the expanded documentation failed to build in #24, and Amit requested back-branch coverage in #25; Osumi fixed the SGML structure and supplied branch-specific patches in #26.
- Vignesh proposed a clearer explanation of the locking problem in #28, and Amit refined it into an itemized list, requested separate general and two-phase patches, and extended coverage to PostgreSQL 9.6 in #29 and #30, producing the split series in #31.
- Reviews of terminology and repetition in #32, #33, and #40 led Osumi to simplify the examples, repair the cross-reference, harmonize branch variants, and standardize wording across #39 and #41.
- Amit proposed final wording changes and removal of unnecessary index terms in #44; Vignesh verified the documentation still built in #45, and Osumi accepted the edits in #46.
- Both HEAD documentation patches from #41 landed together, with those light edits, as 3cb828dbe2, backpatched through PostgreSQL 9.6 and announced in #47.
- After that landing, Simon Riggs's comments prompted clarification that the examples also apply to user catalog tables, as discussed in #48, #49, and #50; Osumi supplied a follow-up adding a capabilities link and broadening the CLUSTER example in #51.
- Amit broadened the remaining examples in #52, but Osumi found the repeated qualifications cumbersome and proposed one note after the list in #53; Amit agreed in #54, and Osumi implemented and corrected the note in #55 and #56.
- The follow-up landed from #56 with only a word substitution and spacing changes as c66fb78ebb, again backpatched through PostgreSQL 9.6; the final message #57 confirms the push, leaving the documentation work complete and the proposed transaction restrictions uncommitted.