model-writtenrun 7212 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Justin Pryzby proposed frontend syncfs support in September 2021, attaching an initdb prototype and common synchronization helper intended for several utilities #1.
- Michael Paquier initially favored using syncfs automatically, but Thomas Munro explained that it flushes unrelated filesystem data and fails to report some errors on older kernels, establishing the case for an explicit option #2 #3 #4.
- Justin found an external workaround using /bin/sync -f and eventually left the prototype for someone else to adopt, noting that shared filesystems could make syncfs slower #5 #6.
- Nathan Bossart revived the work in July 2023 to reduce pg_upgrade downtime, introduced a shared --sync-method option, and subsequently added documentation, directory-format pg_dump support, and help text #7 #8 #10.
- Nathan's 100,000-table benchmark reduced pg_upgrade time from about 5 minutes 50 seconds with fsync to 3 minutes 44 seconds with syncfs, close to the no-sync run at 3 minutes 28 seconds #11.
- Michael's review prompted clearer unsupported-build errors and a shared DataDirSyncMethod enum; Nathan retained synchronization of each tablespace path without mount-point deduplication and kept fatal synchronization failures consistent with existing behavior #12 #13 #16 #17.
- Robert Haas argued that --no-sync should remain because it is concise, intuitive, and important for regression tests, and Michael agreed #18 #19.
- Michael identified unsafe frontend inclusion of storage/fd.h, and Nathan resolved it with a separate PG_TEMP_FILE* macro move that Michael approved; the revised series also consolidated repeated caveats into a dedicated appendix #20 #23 #24 #25.
- After a rebase, Michael requested that the synchronization helpers themselves reject unavailable syncfs, leading Nathan to use explicit enum switches and then split the work into four patches with a conditional initdb test #26 #27 #28 #29 #30.
- Michael accepted the split and suggested removing a redundant fsync test, producing the final feature submission #31 #32.
- Justin reviewed allocation, error messages, and utility coverage; Nathan explained that pg_dumpall synchronizes only one file and pg_receivewal's synchronization controls streaming, so neither received the new option #33 #34 #35 #36.
- Nathan first committed the macro-move component of #32 unchanged as f39b265808 and announced that the remaining components would follow #37.
- The remaining components of #32 landed as 3ed1956719, cccc6cdeb3, and 8c16ad3b43, with only helper renaming, comments, and a documentation typo changed before Nathan's completion announcement #38.
- Maxim Orlov then demonstrated that additional header inclusions could expose conflicting backend and frontend sync_method declarations and supplied a patch renaming the backend variable to wal_sync_method #39.
- Nathan suggested extending the naming cleanup, and Maxim expanded his patch to use WAL-prefixed constants, renamed platform defaults, and a WalSyncMethod enum #40 #41.
- Peter Eisentraut objected that the syncfs appendix contained too little material and suggested moving it into platform-specific documentation; Nathan initially agreed to investigate #42 #43.
- Nathan polished Maxim's naming patch, added the assignment-hook rename, and corrected one missed constant; the final attachment landed unchanged with Maxim's author credit as 8d140c5822 #47 #48.
- By the last supplied message, the feature and naming cleanup were committed, but the documentation location remained unresolved because Nathan considered the proposed server-setup chapter unsuitable for material shared with client utilities #49 #50.
- The documentation issue was subsequently resolved in thread #48419, where Nathan's March 2024 attachment #557984 landed as 44a4cca991, removing the appendix, restoring the caveats under recovery_init_sync_method, and redirecting utility references there; that matching attachment supersedes the previous attribution to this thread's discussion.