model-writtenrun 5935 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Aug - Nov 2021 · 23 entries
- Alvaro Herrera opened the thread with #1, proposing to hold physical streaming behind incomplete WAL records so a primary crash could not leave replicas holding a record whose tail had been overwritten.
- Nathan Bossart identified a registration-versus-flush race in #3, prompting #4, and Jakub Wartak reported substantially improved fault-injection results in #6.
- Nathan then demonstrated that tracking only the earliest and latest segment boundaries could miss an unsafe intermediate boundary in #9; Alvaro also found that tracking depended incorrectly on archiving being enabled in #10, and addressed that configuration issue in #17.
- A separate experiment to allow pg_walfile_name() during recovery was posted in #11, but remained unresolved because the timeline was not available as expected and cascading replication made the choice ambiguous, as Kyotaro Horiguchi explained in #13.
- Andres Freund challenged the boundary-tracking design in #18 because it burdened hot paths, complicated cascading replication and future optimizations, and risked latency or deadlocks; he proposed preserving partial WAL records and marking their missing continuation instead.
- The replacement design settled on a special page flag and an explicit record carrying validation information in #20, with clarification that the marker belongs in the unwritten tail in #22 and should cover page-spanning records generally in #25.
- Kyotaro supplied a working prototype in #27, and Alvaro merged it with his own implementation in #28, separating the old implementation's revert from the replacement and debugging support.
- Kyotaro's review in #29 led to broader error-path handling and validation discussion, while Andres explained in #33 that appending fields to allocated XLogReaderState objects could preserve stable-branch ABI compatibility.
- Alvaro expanded comments and debugging support and added a small pg_rewind assertion conversion in #35; the obsolete archive-delay implementation was then reverted by 96b665083e, leaving the replacement series in #39.
- Andres requested an explicit validation record in #37, leading to XLOG_OVERWRITE_CONTRECORD in #43; Kyotaro caught incorrect page-flag placement in #44, and #45 restored marking in AdvanceXLInsertBuffer while separating the broken-record and missing-continuation pointers.
- The implementation gained overwritten-LSN validation and a reproducible TAP test in #46, and Nathan confirmed that it fixed his original reproducer in #47 before reviewing the need for the extra WAL record in #50.
- Alvaro's #54 standardized naming, added overwrite timestamps and archive-based testing, and split out documentation that landed independently as ade24dab97; partial-record CRC validation remained unimplemented, with its limited value discussed in the same message.
- Backport testing exposed a promotion failure, ultimately traced to acting while still in standby mode; #58 added the guard and supplied branch adaptations after #55 explained why older branches lacked the second test.
- After waiting for the PostgreSQL 14.0 tag as announced in #59, Alvaro committed the final WAL repair as ff9f111bce and confirmed the push in #60, retaining development-branch tests and making light formatting, comment and typedef adjustments.
- Windows failures reported by Tom Lane in #62 led to the replication-configuration remedy discussed by Andrew Dunstan and Tom in #67 and #68, while Andres identified an unfinished IPC::Run handle in #69; both fixes landed from discussion in d03bca4d70.
- Further failures reported in #75 prompted Alvaro to compare test coverage and find that the archive-based case added no meaningful coverage; Tom endorsed its removal in #77, and #76 landed unchanged as d186d233df, also correcting a log-message typo.
- Amul Sul explored removing recovery globals in #82, but page-boundary concerns in #85 required the revised conversion logic in #97; Kyotaro objected in #99 and #101 that this exposed xlogreader internals, and the cleanup did not land in the supplied history.
- Jakub's production-style fault-injection tests in #83 confirmed that the committed repair let both direct and cascading standbys recover correctly after primary failures.
- Andres reproduced remaining test instability under valgrind in #87 and traced it to unrelated WAL generation in #88; Alvaro replaced estimated bulk insertion with a loop in #93, Andres verified it in #95, and it landed unchanged as 010e523373.
- Alexander Lakhin noticed that older branches still contained the spelling error in #103; Alvaro corrected the message, test expectations and translation catalogs in f914b8badc, c3bda112eb, 3aa572b8b2, 7c0a78f089 and 9b6194eb0a, confirming the work in #104.
- Tom reported continuing timing failures in #102, then demonstrated the autovacuum race and proposed disabling autovacuum and using string filename comparisons in #105; those changes landed as b66767b56b.
- Buildfarm failures reported by Tom in #108 exposed a real page-boundary LSN mismatch; Amul identified inconsistent pointer assignments in #110, and Alvaro initially proposed changing the recorded LSN and tolerating old values in #116.
- Tom argued that the value already written to WAL should remain authoritative in #115 and criticized overly permissive compatibility checks in #117; Alvaro consequently abandoned the attached proposal and explained the simpler reader-side fix in #120, which landed as 44bd3ed332.
Mar 2022 · 1 entry
- The thread ended months later with #121, when Alvaro recovered the overlooked pg_rewind component of #39 and committed it unchanged as 3e1c942a4e; the main repair and follow-up fixes had landed, while the recovery filename experiment and global-variable cleanup remained uncommitted.