model-writtenrun 942 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Nathan Bossart reported that unlocked checkpoint updates could race with the checkpointer and leave pg_control with an invalid checksum, supplying a locking fix in #1; Thomas Munro confirmed the cross-process race in #2.
- Thomas Munro prepared the fix for backpatching in #3, and Fujii Masao approved it while identifying the same missing-lock problem in XLogReportParameters() in #4.
- Michael Paquier proposed an UpdateControlFile() lock assertion with an exception for early startup in #5; Nathan Bossart instead supplied an add-on that acquired the startup lock unconditionally and fixed XLogReportParameters() in #7.
- Michael Paquier and Fujii Masao accepted the parameter-reporting fix but preferred avoiding unnecessary startup locking in #8 and #9, leading Nathan Bossart to split the work into three patches and introduce a boolean assertion bypass in #10.
- Following Michael Paquier's recommendation to combine the two actual bug fixes in #11, Thomas Munro committed those portions of #10 unchanged as 57cb806308 and announced the squash in #14.
- The assertion patch remained uncommitted: Thomas Munro questioned its extra parameter in #14, while subsequent discussion weighed simpler unconditional startup locking against an explicit exception without settling the implementation #15 #16 #17.
- Four years later, Melanie Plageman reopened the thread after a Windows recovery test reported an incorrect control-file checksum in #18; Nathan Bossart suggested investigating locking and read/write atomicity in #19.
- Tom Lane and Andres Freund distinguished concurrent torn reads from disk-write atomicity and discussed retries and backup-related remedies in #20 #21 #22 #23; Thomas Munro then identified EXEC_BACKEND children rereading pg_control during concurrent writes as the specific problem in #24.
- Because early child startup cannot acquire LWLocks and the postmaster cannot safely lock a fresh shared-memory snapshot, Thomas Munro proposed passing its original proto-controlfile snapshot to children in #25, reporting successful Linux EXEC_BACKEND and Windows CI runs.
- Noah Misch initially supported the snapshot strategy in #26, and Thomas Munro promoted it from draft to proposal while noting the alternative of passing individual settings in #27; Alexander Lakhin subsequently reported another suspected occurrence and requested a reliable reproducer in #28.
- Noah Misch corrected his initial comparison with forked backends in #29, explaining the risk of stale mutable fields and suggesting individual-setting propagation or poisoning mutable snapshot fields.
- After the proposal stalled, Alvaro Herrera cited continuing failures and rebased Thomas Munro's unchanged snapshot approach in #31, leaving the suggested safeguards for further work.
- Alexander Korotkov replaced the snapshot approach in #32 with explicit checksum-version propagation, existing WAL-size GUC propagation, and recomputation of derived WAL settings; the thread ends with this EXEC_BACKEND rework proposed and no further landing shown.