model-writtenrun 6295 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Pyhalov reported that combining session-level exclusive and transaction-level shared advisory locks on the same object caused PREPARE TRANSACTION to panic on PostgreSQL 13.3 and 14beta2, with a reproducer and backtrace in #1.
- Tom Lane initially thought a transaction-level shared lock alone could trigger the panic, and noted that the transaction was already prepared when the crash occurred in #2.
- Tom Lane corrected that diagnosis in #3: a session-level lock had persisted, and conflict detection missed locks with different modes because they occupied separate LOCALLOCK entries sharing one PROCLOCK; his patch introduced a temporary hash table keyed only by locktag and added regression tests, while rejecting a broader LOCALLOCK redesign as risky for backpatching and potentially costly.
- Tom Lane committed #3 unchanged as 6310809c4a, preserving the restriction on mixed session- and transaction-level locks and backpatching the fix to all supported branches.
- After the commit, Andrey Borodin questioned an expected error in #4; Tom Lane explained that the alternate expected output handles servers with prepared transactions disabled in #5, and Andrey acknowledged his misunderstanding in #6.
- Michael Paquier confirmed the landing of 6310809c4a in #7, leaving no outstanding patch revisions in the thread.