model-writtenrun 8724 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Kyotaro Horiguchi reported an assertion failure when targeted recovery rereads the last valid record across a WAL segment boundary, attaching a reproduction test and a fix that reset the recovery source on random access in #1.
- Fujii Masao questioned using random access as the trigger and proposed checking whether standby mode had ended in #2 and #4; Kyotaro adopted that condition in #5 and dropped a separate proposal to change ReadRecord's state handling.
- Fujii explained that the random-access approach could leave WAL receiver running with an incompatible source state and cause unnecessary reconnections in #6 and #8; Kyotaro accepted that reasoning and added a lastSourceFailed reset and proper TAP accounting in #9.
- Fujii requested broader WAL receiver assertion coverage and suggested replacing numeric source values with XLOG_FROM_ANY in #10; Kyotaro moved the assertion and added a separate XLogSource cleanup in #11, retaining the failure-state reset for consistency when switching sources.
- Fujii posted a replacement crash fix with fuller comments and an additional assertion before disabling standby mode in #12, while requesting that the cleanup cover other source variables and function parameters; Kyotaro accepted the crash-fix revision and supplied the expanded cleanup in #13.
- Fujii committed the crash-fix attachment from #12 unchanged as ef34ab42a8, backpatched it to all supported branches, and confirmed the landing in #14, leaving the cleanup and test for further review.
- Fujii committed the expanded cleanup from #13 with only rebase differences as 71e0d0a737, then raised concerns about LSN rollover and background WAL activity making the remaining test unstable in #16.
- Kyotaro revised the remaining test to handle rollover without oversized integer arithmetic and synchronize replication after VACUUM and a WAL switch in #17, noting that he had not originally intended the reproduction test for inclusion; after his wording correction in #18, both backend changes were committed but the revised test still awaited review.