model-writtenrun 8457 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Alexander Kukushkin reported production standbys becoming stuck after failover when an incomplete page-spanning WAL record was replaced on the promoted node, and supplied a reproducing TAP test in #1; Michael Paquier reproduced the loop in #2.
- Kyotaro Horiguchi questioned whether the deliberately damaged archive represented a real failure in #3, while Alexander explained that equally advanced standbys could receive an incomplete record before a primary crash in #5; Michael accepted the test technique and requested shared WAL-manipulation helpers in #6.
- Kyotaro considered a receiver-reconnection race in #7, withdrew that explanation in #8, and identified overly broad page-header validation as a possible cause in #10.
- Alexander submitted a fix that returned a read failure after a timeline change, together with an updated test, in #11; Kyotaro instead proposed restricting early validation to segment boundaries in #12, and Alexander corrected its hard-coded boundary size to wal_segment_size in #13.
- Kyotaro traced a separate failure to reading old-timeline WAL after learning of a timeline switch and proposed stricter timeline-history enforcement in #16; Alexander emphasized pg_rewind for divergent standbys in #17, and Ants Aasma linked related work in #18, but that broader change was not included in these commits.
- After months without a revised patch, Michael returned with additional reports of similar infinite loops in #22 and reconsidered the segment-boundary fix and its backpatchability in #23.
- Michael adopted Kyotaro's segment-boundary approach in #24, split out reusable WAL test helpers, integrated Alexander's regression test, and fixed a test race by waiting for both standbys to log their invalid-page errors.
- Alexander approved the backend fix and helper refactoring while proposing additional deduplication in #25; Michael deferred those broader helper interfaces to keep the bug fix focused in #26.
- Michael committed the helper-refactoring portion of #24 as 32a18cc0a7, with emit_wal naming and documentation adjustments, then announced backpatching through PostgreSQL 13 and posted branch-specific versions of the remaining fix in #26.
- The remaining segment-boundary fix and regression test from #26 landed as 6cf1647d87, also backpatched through PostgreSQL 13; Michael confirmed completion and initially healthy buildfarm results in #27.
- Maksim Melnikov reopened the discussion in November 2026 with a reproducer showing that 039_end_of_wal.pl could report an invalid page magic number instead of the expected incorrect previous-record link, tracing this to manual WAL writes targeting an uninitialized page in #28.
- Maksim's follow-up patch in #28 passes the last emitted record's end LSN into advance_wal_out_of_record_splitting_zone and emits additional WAL until that LSN and the insertion LSN occupy the same page, updating both recovery tests; this proposed test-helper fix remains awaiting review, with no subsequent response or landing shown.