model-writtenrun 7056 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Michael Paquier proposed assertion-only safeguards for pg_fsync() to catch incorrectly opened descriptors across platforms, requiring read-only directories and writable files while assuming O_RDONLY was zero #1.
- Mark Dilger supplied clearer comments and directory-first branching while questioning ignored fstat() errors #2; Michael retained fsync() as the error-reporting operation, incorporated Mark's changes, excluded Windows because it lacks fcntl(), and added an errno reset #3.
- Mark confirmed that regression tests passed and that deliberately opening descriptors in the wrong mode triggered the assertions #5; Michael then committed the final patch #3 with comment-only adjustments as 12198239c0, announcing completion in #7.
- In June 2025, Michael Banck reopened the issue after assertion-enabled initdb failed on GNU Hurd, where O_RDONLY equals one, and proposed masking flags with O_ACCMODE before comparing against O_RDONLY #8.
- Michael Banck credited Samuel Thibault with reviewing and improving the portability fix sufficiently to merit co-authorship #9.
- Michael Paquier supported the fix and favored retaining the safeguard for fsync-disabled tests #10; Tom Lane considered POSIX support for O_ACCMODE reassuring but wanted progress toward a working Hurd buildfarm member before taking the portability risk #11.
- Michael Banck reported that low-resolution timers broke statistics tests and that buildfarm runs could hang the VM, attaching failure-output differences rather than replacement patches #12.
- Michael Banck subsequently obtained adequate timer resolution by rebuilding GNU Mach with APIC support and reported ten successful test runs after disabling debug_parallel_query #13; Tom confirmed that this buildfarm configuration was acceptable #14.
- At the thread's last message, Michael Banck said the Hurd setup required only this safeguard fix and another separately discussed backend patch, and planned to resubmit both for the next commitfest #16, answering Michael Paquier's question about remaining custom changes #15.
- The portability fix subsequently landed as 3a2617e4f0 from the later submission #594324 in the GNU/Hurd portability thread thread #51831, superseding attribution to #8; Tom Lane retained the access-mode logic with comment revisions, credited Michael Banck and Samuel Thibault, and specified backpatching through PostgreSQL 13.