model-writtenrun 8500 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Yura Sokolov proposed increasing WAL insertion locks from 8 to 64 and adding two conditional acquisition attempts in #1, reporting substantial synthetic-workload gains on his notebook and about 6.5% improvement in a standard pgbench run with asynchronous durability settings.
- Andres Freund warned in #2 that more insertion locks increase reservation-spinlock contention and the cost of scanning locks; Yura initially challenged that conclusion in #3 because the posted benchmark figures appeared to show an improvement.
- Yura published Andres's correction in #4: the original figures had been reversed, and a fresh large-record benchmark fell from 2788 TPS with 8 locks to 1865 with 64 and 1543 with 128, establishing a counterexample to raising the default.
- Japin Li reported benchmarksql gains with 64 and 128 locks on a 64-core Hygon system in #5, but testing 256 locks caused a PANIC reporting too many LWLocks taken.
- Wenhui Qiu favored 64 locks in #6, Yura agreed in #7 that the small additional gain at 128 did not justify potential waiting costs, and Japin concurred in #8; Andres's regression concern remained unresolved.
- After nearly twenty-two months, Zhiguo Zhou revived the proposal in #9 as a bounded startup setting that preserves the default of 8, accepts powers of two from 4 to 128, rejects invalid values, and uses bitmask selection; the patch retains reverse-order release and adds configuration, concurrent-insertion, segment-switch, and recovery tests.
- Zhiguo reported Andrew Kim's off-list review and testing in #9, carefully identifying the reported 40.4% gain at 64 locks as a combined result with a separately submitted CAS128 reservation patch; the configuration patch applies independently, and higher lock counts still regress on the large-record workload.
- At the close of #9, the proposal remained open for review of configurability, bounds, and validation, with CAS128 and a writer diagnostic left for separate discussion and no linked commit.