model-writtenrun 5203 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby reported that PostgreSQL 15 beta recovery failed after an OOM crash with a WAL flush request beyond the apparent end of WAL, while disabling recovery prefetch allowed startup #1.
- Thomas Munro supplied diagnostic logging #7, and Justin's comparison runs showed that prefetching stopped recovery early even with a previously suspected contrecord fix present #8; WAL debugging then confirmed that the affected visibility-map record was never replayed with prefetching enabled #11.
- After initially reproducing the issue with compressed WAL #12, Thomas traced the trigger to maintenance_io_concurrency=0 and incorrect IO accounting, finding that settings of at least three allowed Justin's recovery to complete #13.
- Thomas's fix processed completed IO before starting more, removed the minimum concurrency clamp, made zero disable prefetching, and dropped dangling references to partially prefetched records; it also added a missing-contrecord error to prevent retries from overwriting recovery state exposed by 026_overwrite_contrecord.pl #14.
- Thomas revised the error handling to preserve an existing error and reported check-world testing at several concurrency settings plus live standby configuration changes #15; Kyotaro Horiguchi supplied a simpler diagnostic and requested a clearer record-release interface #16 #17.
- Thomas incorporated that feedback by returning the next LSN from XLogReleasePreviousRecord() and simplifying the error check #18, and Kyotaro confirmed that the revised code was easier to read #20.
- The fix missed the beta4 deadline: Thomas asked whether it could still be included #19, but Tom Lane explained that tarballs were already with packagers and a late change would lack adequate buildfarm coverage #22; Jonathan S. Katz tracked it for the anticipated RC1 release #24.
- Thomas committed #18 with only comment and commit-message edits as adb466150b, with a backport to PostgreSQL 15, and confirmed completion in #25.
- In the closing explanation, Thomas confirmed that pg_waldump had reached the expected end and explained that visibility-map pages can be read from disk with future LSNs even when their corresponding WAL was not replayed, resolving the original apparent contradiction with no further patch revision pending #25.