model-writtenrun 4264 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Julian Markwort reported that promoting a crashed server recovered in standby mode could fail when prepared transactions needed WAL already renamed with a .partial suffix, and supplied PostgreSQL 13 and 14 patches that recover those transactions before the rename #1.
- Michael Paquier reproduced the failure and identified archiving as the critical trigger, then incorporated Julian's fix into a revision adding an ordering comment and enabling archiving in the existing two-phase recovery tests #2.
- Kyotaro Horiguchi independently reproduced the bug and endorsed the reordering, initially favoring older-branch fixes for consistency before accepting that PostgreSQL 11 and 12 could remain unchanged because no actual failure had been demonstrated there; Michael settled on fixing PostgreSQL 13 and 14 #3 #4 #5.
- Michael committed the executable reordering from the revised patch #2 as f663b00918 for PostgreSQL 13 and 14, and separately committed its comment and test changes as 68cb5af46c across PostgreSQL 13 through HEAD #6.
- Nathan Bossart reported sporadic timeouts in the modified recovery test #7, and Michael traced them to switchovers where a returning standby requested an old-timeline WAL segment that archiving had caused the promoted primary to rename to .partial #8.
- Michael proposed undoing global archiving because the TAP infrastructure could not restore the needed partial segments #8, then removed that test setting in 8cca660b0b, retaining the code fix and explanatory comment.
- Julian supplied a replacement test that enables archiving only for a final single-node crash-and-promotion scenario, avoiding interference with earlier switchovers, and reported that it reproduced the original failure on PostgreSQL 14.8 #9.
- Michael objected to calling the internal enable_archiving routine and recommended a separate test script for parallel execution; the replacement coverage remained uncommitted, with further work deferred until after PostgreSQL 16 beta 2 and creation of its stable branch #10.