model-writtenrun 6946 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Aug 2025 - Apr 2026 ยท 32 entries
- Andres Freund opened the thread by explaining that concurrent hint-bit changes complicate checksums and asynchronous writes, while separate buffer-state and content-lock variables make race-free I/O coordination difficult; he proposed dedicated buffer locks, 64-bit state, and atomic unpinning in #1.
- Robert Haas supported the architectural direction, while Noah Misch explored alternative synchronization and lock names; Andres explained why the alternatives were expensive or fragile and why multiple hint writers would consume scarce state bits, retaining the share-exclusive design and an incremental performance-conscious rollout #3 #5 #7 #10.
- The first attached series combined Andres's preparatory changes with Thomas Munro's ReadRecentBuffer() scalability patch, and Robert's review led to clearer ownership rules and dropping atomic dirty-marking because making it safe required extra complexity #13 #14.
- After Matthias van de Meent's review, Thomas's ReadRecentBuffer() change landed with deferred private-refcount creation as 819dc118c0, and the FlushUnlockedBuffer() extraction landed unchanged as 3c2b97b29e from #14 #15.
- The same preparatory submission supplied the content-lock helper cleanup in 3baae90013 and the CAS-based StrategyGetBuffer() pinning change, with comment polish, in 5e89985928 #14.
- Testing the planned wider buffer state exposed BufferSync()'s signed mask, which Andres fixed separately without an attached patch as 2a2e1b470b.
- The new StrategyGetBuffer() path omitted Valgrind initialization and turned the skink buildfarm animal red; Andres centralized the annotations in TrackNewBufferPin() in #18, committed unchanged as c819d1017d.
- The remaining header-lock changes, including a corrected returned-state assignment, landed from #18 as c75ebc657f and 5310fac6e0, enabling concurrent permitted state changes and atomic-sub unpinning.
- Andres then posted the main redesign with dedicated content locks, a share-exclusive mode, batch visibility checks, and prototype page-copy removal; Greg Burd reviewed the locking implementation, and Melanie Plageman supplied detailed reviews of the prerequisites, wakeups, error recovery, and hint-bit API #20 #21 #23 #28.
- The independent LWLockWakeup() bugfix from #20 landed unchanged as 8082b759d9, with Melanie recommending backpatching despite its limited immediate consequences #25.
- Review led Andres to split out previously unlocked FSM updates, improve lock documentation, restore catalog-lock checks, and optimize spin-delay setup; Heikki Linnakangas accepted the single hint-writer tradeoff after Andres explained its simpler state representation #35 #36 #37 #38.
- The revised prerequisites landed from #38: the lock-mode enum as 156680055d, unlocked 64-bit atomic writes as 7902a47c20, and the generalized buffer wait class with a typedef-list update as 6c5c393b74.
- The private-refcount key separation and one-entry cache also landed from #38, with explanatory comment polish, as edbaaea0a9 and 30df61990c.
- Heikki's request to align the two spin-delay implementations produced a combined patch in #47, committed unchanged as 09ae2c8bac; the same submission supplied the unchanged HEAP_MOVED helper extraction in 548de59d93 #42 #45.
- After the December landings, Andres posted the remaining work in January, removing experimental batch-argument alternatives and separating flag-layout prerequisites; Kirill Reshke approved the FSM and CLUSTER preparations, and Andres reported their landing #48 #49 #50.
- The FSM locking patch landed unchanged from #48 as 45f658dacb, while the batch-visibility implementation landed with two comment improvements as 0b96e734c5.
- Melanie's review clarified inhibited-wakeup semantics, and the unchanged flag inversion and descriptor-definition patches in #53 landed as 9a385f6166 and ff219c1987 #51 #54.
- Chao Li supplied a macro-refactoring delta and suggested a clearer wakeup variable name; Andres declined the generic MASK macro and extra refcount shift, adopted selected feedback in the next series, and committed the unattached variable rename as 556c92a689 #57 #61.
- Chao found a missed autoprewarm state-width conversion, and Andres folded resource-owner renaming and obsolete wait-tranche removal into the revised implementation; moving locking into a separate header was abandoned because it would expose private-refcount internals and worsen generated code #58 #63.
- The corrected 64-bit state and dedicated content-lock implementation landed from #63 without substantive edits as dac328c8a6 and fcb9c977aa, followed by unchanged removal of obsolete LWLock iteration and disowned-lock support as 55fbfb738b and d40fd85187.
- Tom Lane reported compiler warnings in the new locking code; discussion favored initializing wait_event while retaining exhaustive enum checking, producing the unattached fix 84705b3727 #69 #71 #72 #74.
- Alexander Lakhin's SP-GiST reproducer exposed an overly strict conditional-lock assertion, and Tom Lane and Peter Geoghegan explained that index free-space allocation legitimately retries buffers already owned by the backend #75 #78 #79.
- Andres proposed returning false for every conditional acquisition of an already-owned buffer in #82; after removing an accidentally retained assertion, that fix landed as 333f586372, while broader crash-safe index-FSM improvements remained future work #83 #89 #90.
- The February remainder introduced normal dirty-before-WAL ordering, removal of BM_JUST_DIRTIED, and an independent in-place-update adjustment; Heikki reviewed checkpoint correctness and comments, and Noah approved the in-place-update change #91 #93 #94 #95 #106.
- Meanwhile, Antonin Houska traced incorrect logical-decoding visibility to the new batch path and proposed general visibility dispatch; Andres rejected its sequential-scan overhead and requested separate ordinary-MVCC and MVCC-like predicates, which Antonin implemented after confirming the diagnosis #99 #101 #103 #104 #105.
- The in-place-update and share-exclusive hint-bit/flush patches from #91 landed with comment polish as f4a4ce52c0 and 82467f627b, making hint changes mutually exclusive with buffer writes.
- The same submission supplied unchanged BM_JUST_DIRTIED removal in b0f4ff3c92 and the normal WAL-ordering change with a comment adjustment in a766125efd; Andres then reposted the remaining page-copy and unlock/unpin optimizations as three patches #91 #107.
- Antonin's revised snapshot predicates in #110 landed with comment and commit-message edits as ce5d489166, keeping historic snapshots out of the ordinary page-at-a-time MVCC path #112.
- Alexander Lakhin reported a hash-index assertion caused by passing the wrong buffer to the new hint-bit API, and Andres acknowledged it and later announced the fix here; the latest matching attachment was Heikki Linnakangas's #618510 in thread #53523, from which f5eb854ab6 landed with added hash-overflow regression coverage #109 #111 #113.
- Melanie's final review caught obsolete checksum comments and a missing Valgrind annotation; after corrections and Valgrind checking, the remainder from #107 landed as 41d3d64e87, 8df3c48e46, and f39cb8c011, completing the posted main series #114 #115 #116.
- Yura Sokolov then found that waiting for the buffer-header lock could invalidate PinBuffer()'s earlier validity check; Andres retained the necessary header-lock interlock and restarted the CAS loop after waiting, landing c0af4eb4e7 without an attached patch #117 #118 #119.
- At the thread's end the main redesign and identified fixes had landed, but ChangAo Chen reported stale buffer/README descriptions of LWLock-based content locks and shared-lock flushing, with no resolution shown; asynchronous-write integration and further pin/lock optimizations remained subsequent work #120 #107.