model-writtenrun 5102 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Dmitriy Kuzmin reported reproducible standby startup crashes when long transactions held many exclusive locks across repeated WAL lock records, and David Rowley traced the allocation failure to a lock list growing far beyond the number of locked relations #1 #2.
- Tom Lane identified checkpoint-driven duplication in RecoveryLockLists and proposed per-transaction hash tables to deduplicate locks, while expressing concern about overhead on ordinary workloads #4.
- Tom then replaced the subsidiary hash tables with one persistent lock hash and per-XID linked chains; Nathan Bossart endorsed the approach, and Kyotaro Horiguchi preferred its lower per-transaction overhead while discussing release costs #5 #6 #7.
- Tom supplied separate startup-process instrumentation and benchmarked recovery regression tests, finding no significant performance penalty; he proposed committing the revised fix only to HEAD, and Nathan agreed that backpatching could wait for further reports #8 #9.
- The revised lock-deduplication patch #5 landed unchanged as 66c2922e76, without the diagnostic instrumentation or backports because substantial benefits appeared confined to corner cases.
- After the commit, Simon Riggs supported eventual backpatching because the performance cost was limited to transactions using exclusive locks, and Kyotaro added his support; the thread ended with the fix landed on the development branch and backpatching still a possibility #10 #11.