model-writtenrun 5581 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Robert Haas proposed removing an unnecessary last-checkpoint readability check from StartupXLOG(), arguing that the checkpoint must remain readable for crash recovery, and suggested eventually using end-of-recovery records in every recovery mode #1.
- Stephen Frost questioned the distinction between skipping a checkpoint and requesting one later; Robert explained that an end-of-recovery record permits new WAL-generating work while a spread checkpoint runs, whereas the existing immediate checkpoint blocks startup #2 #3.
- Kyotaro Horiguchi and Andres Freund supported removing the check after examining WAL retention and its historical rationale, while Robert rejected Amul Sul's proposed replacement diagnostic because missing WAL could arise anywhere, not specifically at this point #9 #10 #12 #14.
- Robert committed the original patch without code changes as 1d919de5eb and announced its completion #16.
- Robert then posted an experimental patch to use end-of-recovery records universally, exposing an initial-transaction-ID assertion failure and a preexisting wal_level=minimal tablespace-replay bug; its temporary workarounds skipped standby snapshots in single-user mode and deleted the failing recovery test #17.
- Attempts to reproduce the assertion failure prompted discussion of the unconditional checkpoint request and whether standby snapshots could be skipped explicitly, but no permanent solution was settled at that stage #19 #20 #22 #23.
- Amul Sul showed that requesting the follow-up checkpoint only after recovery avoided the observed regression failures, and discussion established that lastReplayedEndRecPtr could detect recovery after InRecovery had been cleared; his revised full patch removed the snapshot workaround and restored the recovery test #24 #25 #26 #27 #28.
- Amul subsequently rebased the patch, removed the newly introduced PerformRecoveryXLogAction() helper and all CHECKPOINT_END_OF_RECOVERY handling, and discarded unrelated assertions in bgwriter.c and slot.c #29.
- After the patch stopped applying and waited for an update, Robert revived it in April with a two-patch series intended for PostgreSQL 16 or later: he reported that Noah had fixed the tablespace bug, chose an initial nextXid of 4 to avoid the snapshot assertion, and added removal of the now-redundant previous timeline ID from checkpoints #30 #31.
- Amul again identified an unnecessary checkpoint after clean startup, and Robert corrected the series to request it only when performedWalRecovery is true #32 #33.
- Nathan Bossart and Kyotaro supported the simplified recovery design and initial-XID adjustment, but Amul questioned whether that adjustment remained necessary once checkpoint requests were conditional #34 #35 #36.
- Robert then relayed Thomas Munro's concern that recovery removes relfilenode tombstones, allowing file reuse before a checkpoint; Nathan clarified that a second crash could replay an old drop and destroy newly created, unlogged contents, and Thomas confirmed that this double-crash scenario was the concern #37 #38 #39.
- At the thread's end, the original readability-check cleanup had landed, but the broader two-patch series remained under discussion pending a solution for relfilenode reuse, with preserving tombstones during recovery or changing relfilenode allocation proposed as possible remedies #16 #33 #37 #39.