model-writtenrun 3756 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Bharath Rupireddy opened the thread with a shortcut that avoided waiting on the caller's own WAL insertion lock, but Andres Freund argued that atomic insertion positions could eliminate more contention across all locks #1 #2.
- Bharath replaced the narrow shortcut with atomic insertingAt accesses and a no-waiters fast path, reporting substantial gains at high client counts; Andres then requested separating the atomic conversion and keeping the optimization inside lwlock.c #3 #4.
- The next submission split the work and added an imported lastImportantAt atomic conversion, while removing the redundant unlocked-lock check from WaitXLogInsertionsToFinish() #5.
- Nathan Bossart questioned memory ordering, and Andres explained that the fast path could miss waiters without a barrier, recommended atomic exchange, and saw insufficient benefit in converting lastImportantAt #6 #7 #9.
- Bharath dropped the lastImportantAt change and combined the remaining work using atomic exchanges; Nathan reviewed the waiter recheck protocol, requested explicit discarded-return casts, and judged the revised patch ready for a committer #10 #12 #13 #14.
- Michael Paquier began deeper review around the feature freeze, supplied testing modules, and requested clearer ordering documentation and benchmarks isolating the fast path's contribution; Bharath resumed in May with revised comments and broader measurements #16 #17.
- Bharath found that removing wait-list locking from variable reads accounted for the main performance improvement, while the no-waiters fast path contributed little to the tested write-heavy workloads #18.
- Nathan and Michael requested longer runs, and subsequent long-duration, tmpfs, and fallback-atomics tests supported the contention reduction without an observed general regression #19 #20 #27 #28 #30 #31.
- Michael requested documenting the barrier dependency at the public LWLockWaitForVar() interface, and successive revisions added that warning and simplified the exchange comments before Michael again marked the work ready for a committer #27 #33 #35 #36.
- After the review pause, Andres requested separate patches and explained why stale lock states and insertion positions were safe for the bounded WAL wait; Bharath split the work into atomic conversion, documentation, and the no-waiters optimization, incorporating that explanation #41 #42.
- Michael requested one final atomic-read comment adjustment, which Bharath included in the final three-patch submission #43 #44.
- Michael committed the atomic-conversion component of #44 as 71e4cc6b8e, with only whitespace differences, and deferred the fast path pending workloads demonstrating its benefit #45.
- Andres cautioned against extensive polishing because he was developing a replacement for WAL insertion locks, then reported a nonreproducible hang after rebasing his AIO tree onto the atomic-conversion commit, with backends waiting despite changed variable values #46 #47.
- Michael committed the documentation component of #44 with light wording edits as 66d86d4201, crediting Bharath and Andres, and closed the commitfest entry while continuing unsuccessful attempts to reproduce the hang #51.
- Bharath requested reproduction details for the hang, but the supplied thread records no confirmed cause, corrective patch, or revert #52.
- In December, Nathan proposed replacing the landed atomic exchanges with atomic writes that rely on subsequent locking barriers; Michael questioned the ordering argument and requested strict benchmarking, leaving this follow-up unresolved at the thread's end, with the original no-waiters fast path also uncommitted #53 #54.