model-writtenrun 9365 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Oleksii Kliukin reported a production deadlock involving three sessions locking one row and proposed skipping heavyweight tuple-lock acquisition when upgrading an existing lock, while retaining waits for conflicting multixact members #1.
- Alvaro Herrera reproduced the failure with isolation tests, confirmed the patch prevented it, questioned the application's lock choices, and recommended initializing the new membership boolean in callers #2.
- Oleksii added an isolation test in #3; Alvaro then accepted the combined conflict-and-membership check and requested broader permutations and a distinctive table name, which Oleksii incorporated alongside locking documentation in #5 following #4.
- Alvaro limited backpatching to PostgreSQL 9.6 and newer because the 9.5 isolation tester could not run the tests and 9.4 had substantial conflicts #7.
- Alvaro committed #5 as de87a084c0 with naming, documentation, and test refinements, then reported that attempts to find a breaking scenario had failed #8.
- The thread ended with Oleksii thanking Alvaro for reviewing and committing the fix, with no attached work outstanding #9.
- The later 8b21b416ed records that the initial landing was reverted and restores it with bug fixes: skip_tuple_lock now survives retries at function scope, and an additional savepoint-based test exercises that path; its second discussion link points to thread #40773.