model-writtenrun 5653 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Mar - Apr 2020 · 4 entries
- Teja Mupparti opened the thread with a WAL-replay corruption fix that reversed buffer disposal and physical truncation, so a crash could not leave stale disk pages after their dirty buffers had been discarded #1.
- Kyotaro Horiguchi questioned buffer handling and partial file-truncation failures, while Andres Freund argued that logging a truncation and then continuing after failure could desynchronize primary and replica; Teja's first indexed patch retained buffers through truncation and added PANIC handling using PG_TRY/PG_CATCH #2 #3 #5.
- Alvaro Herrera supplied a real storage-failure example, and Masahiko Sawada questioned the generic PANIC handler and proposed deferring truncation until commit; Andres explained why vacuum's partial truncations made that alternative unsuitable #6 #8 #9.
- Teja clarified that a critical section alone could not prevent the reported recovery failure: a checkpoint could finish after dirty buffers disappeared but before physical truncation, leaving replay to encounter stale page contents #12.
Jun - Aug 2020 · 1 entry
- Heikki Linnakangas identified scanning costs and misuse of buffer I/O state in the original patch, and proposed waiting for outstanding truncations before completing a checkpoint; Kyotaro implemented that replacement after the discussion had remained unresolved for several months #17 #22.
Mar 2021 · 1 entry
- A regression-failure report exposed that checkpoint-start and checkpoint-completion barriers could be needed simultaneously, so Kyotaro replaced the mutually exclusive enum with independent bitmap flags #23 #24.
Aug 2021 · 2 entries
- Robert Haas endorsed the checkpoint-barrier design, requested clearing the barrier before non-WAL-logged FSM maintenance and simpler hint-bit bookkeeping, and explicitly left PANIC-on-truncation-failure hardening as separate work; Kyotaro incorporated those changes #25 #30.
- Both submitted fixes had landed and been backpatched by the thread's end, while separate truncation-failure hardening remained outside these patches; the remaining discussion concerned optional reserved page space for stronger checksums and future coordination after feature freeze #25 #73 #74 #75.
Sep 2021 · 1 entry
- Tom Lane's review initially targeted the older enum patch because the newer attachment had a text suffix; the discussion confirmed that independent bits were already implemented and explained their advantage for the shared checkpoint-wait helpers #26 #28 #29.
Jan 2022 · 1 entry
- Daniel Shelepanov reproduced the original bug, prompting Kyotaro to correct his reproduction settings and discover that a debugging condition had disabled the new wait; the corrected patch successfully handled the reproducer #31 #32.
Mar 2022 · 6 entries
- Robert expanded the explanation of checkpoint phases and truncation ordering, and Kyotaro refined the wording, prepared distinct stable-branch adaptations, and reported successful check-world runs for all versions #33 #36.
- Robert committed the final truncation patch as 412ad7a556, retaining the code from #36 and dropping only its commit-message backpatching sentence, then confirmed the landing #37.
- Tom reported pg_checksums buildfarm failures after the landing, but investigation separated unrelated replication-test failures and ruled out the truncation fix as the cause of the checksum-test failures #38 #40 #43.
- Andres reproduced the checksum failure and verified that the test really modified the intended file while retaining a matching checksum; page LSNs, initial catalog contents, and tablespace-path lengths explained why particular buildfarm configurations failed repeatedly #52 #54 #56.
- Tom proposed guaranteeing corruption by inverting the checksum field instead of overwriting page data, then attached a pg_checksums test patch that also replaced unsafe mixing of seek and syswrite #55 #58 #67.
- Andres requested sharing the checksum-corruption helper with pg_basebackup, and Dagfinn Ilmari Mannsåker requested useful system-error details; Tom accepted both and committed the expanded fix, including additional sysseek cleanups, as 174877f1e3 #68 #69 #70 #71.