model-writtenrun 3427 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Dec 2022 - Mar 2023 · 7 entries
- Bharath Rupireddy proposed reading WAL directly from shared WAL buffers before falling back to files, reporting a 95% buffer-hit rate and implementing reads protected by WALBufMappingLock in #1.
- Kyotaro Horiguchi questioned whole-page copying, contention with writers, and reading incomplete insertions in #2; Dilip Kumar's API review then helped produce conditional locking and simpler byte-count reporting in #7.
- The performance discussion established direct WAL I/O and eventual replication of unflushed WAL as important motivations: Andres Freund explained these uses in #9 and #11, while Masahiko Sawada questioned standalone gains and requested regression checks in #13 and #15.
- Dilip Kumar's detailed review led Bharath to eliminate an extra whole-page copy in #18, remove inappropriate I/O wait reporting, and add a dedicated buffer-read test module in #20.
- Kuntal Ghosh and Nathan Bossart's reviews drove the simplifications through #29, including one lock acquisition per requested range, direct byte-count returns, and revised validation; Bharath reported no meaningful throughput difference between the tested locking strategies in #27.
- Nitin Jadhav demonstrated that eager buffer recycling reduced hit rates and supplied a patch to stop opportunistic clearing in #31, but Bharath rejected it in #32 because preinitialization keeps work off the writers' critical path.
- Bharath moved validation ahead of copying in #33, then batched contiguous copies and restricted noisy diagnostics to WAL_DEBUG in #34, addressing Nathan's remaining concerns.
Oct 2023 - Apr 2024 · 18 entries
- After several quiet months, Jeff Davis reopened the justification discussion in #35, Andres reaffirmed the direct-I/O and replication benefits in #36, and Bharath refreshed validation, tests, and build integration in #38.
- Jeff questioned hiding buffer access inside WALRead(), clarified partial-read semantics, and proposed checking buffer identity around an unlocked copy in #40 and #43.
- Bharath initially pursued an oldest-initialized-page tracker while retaining locked copying in #44, but Jeff explained the before-and-after verification protocol and the need to invalidate a page before zeroing it in #45.
- The series switched to atomic xlblocks entries, invalidation barriers, and lock-free copying in #50, abandoning the oldest-page tracker; Jeff then identified an unnecessary XLogWrite() fallback that Bharath removed in #53.
- Bharath included experimental per-walsender read statistics in #53, noting competing work on pg_stat_io, but did not carry that statistics patch into #56.
- Andres insisted that readers never consume nonexistent or concurrently inserted WAL in #54, prompting insertion-position checks, insertion waits, and result codes in #56.
- Jeff split the prerequisite from #56 into the atomic conversion c3a8e2a7cb and the invalidation barrier 766571be16, adding the shared-memory sizing correction and editing comments; Bharath reposted the remaining reader and tests in #58.
- Jeff's next review removed unused result codes and moved validity checks outside the copying loop in #60; Melih Mutlu reviewed that version in #62, and Andres again rejected page-content validation as a substitute for valid-range metadata in #63.
- Jeff supplied the substantial rewrite in #64, making buffer reads explicit in physical replication and removing redundant page-header checks; Bharath adopted it in #65 while separating proposals for additional callers.
- To permit a small initial landing, #69 separated insertion-wait support and dropped the WAL summarizer call site; Alvaro Herrera's review in #70 then produced the WALReadFromBuffers name and zero-length fallback avoidance in #71.
- Jeff committed the basic physical-replication patch from #71 as 91f2cae7a4, adding a write-position bound and simplifying accounting; his announcement in #74 left insertion waits, the test module, and other callers pending further justification.
- Andres identified the new range-clamping behavior as potentially hiding caller bugs in #75 and #77, arguing that callers must determine a valid range before either buffer access or file fallback.
- Jeff posted an assertion fix and a separate experiment that fills the available end of a requested range in #83; he explicitly did not intend to commit the experimental API in that form.
- Bharath's follow-up series in #86 moved insertion waits into callers, demonstrated an extension page_read callback, and proposed checking the insertion position instead, but Jeff rejected differing assertion-build error behavior in #87.
- Jeff committed the unchanged assertion patch from #83 as 9ecbf54075, replacing range clamping with an assertion that callers stay within the write position.
- Bharath continued the extension and additional-caller work in #88, rebasing onto the assertion and dropping the zero-padding prerequisite, then reformatted tests and refreshed the series through #90.
- By #91, an upstream copied-WAL bound had superseded the proposed range check, so Bharath reduced the remainder to a combined test-and-demonstration module plus a patch enabling more callers.
- Michael Paquier marked the original commitfest entry committed and requested a new thread for PostgreSQL 18 follow-ups in #93; Bharath moved the remaining proposals in #94, and Michael acknowledged the move in #95.