model-writtenrun 8523 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- ChangAo Chen reported that pg_rewind could leave a standby unable to accept connections until its idle primary generated more WAL, tracing the problem to an insertion position beyond a WAL page header in #1, then proposed adjusting recovery's consistency comparison in #2.
- Surya Poondla reproduced the problem and argued for correcting pg_rewind's minimum recovery point rather than teaching recovery comparisons about page headers in #3; ChangAo Chen replaced the original approach with pg_current_wal_flush_lsn() in #4.
- Kyotaro Horiguchi questioned whether the flush position was sufficient and supplied an inline recovery-normalization alternative in #5; ChangAo Chen argued that the insertion position could become unreachable after a source crash in #6, and Kyotaro acknowledged that concern in #7.
- Surya Poondla explained why WAL-before-data ordering makes the post-copy flush position sufficient and requested clearer comments in #8; ChangAo Chen incorporated those explanations and the live-primary callback restriction in #9, retaining the pg_rewind fix.
- Regression testing remained unresolved: ChangAo Chen deferred a test in #9, and Surya Poondla explained how background WAL generation could make hang detection unreliable while suggesting a control-file assertion in #10; Solai V nevertheless confirmed the fix through manual before-and-after testing in #11.
- After ChangAo Chen rebased the patch in #12, Fujii Masao supplied documentation corrections, clearer comments, and backpatch variants in #14; Surya Poondla tested the final version in #15, and Xuneng Zhou raised testing and API-documentation questions in #16.
- Fujii Masao committed #14 with an identical diff as 4a26e36f87, retaining ChangAo Chen's authorship and backpatching through PostgreSQL 15, then announced the push in #17.
- The fix had landed by the end of the thread, while a pg_rewind regression test and clearer documentation of WAL insertion versus record-end positions remained open follow-up questions in #18.