model-writtenrun 6311 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro proposed macOS direct I/O through F_NOCACHE, initially using new file-opening APIs with a boolean parameter; the immediate effect was limited to certain minimal-WAL configurations, while the larger motivation was enabling Mac developers to test future asynchronous and direct-I/O work #1.
- Justin Pryzby asked whether unsupported direct-I/O requests should fail #2, while Andres Freund identified that the new APIs would also need to preserve the request across virtual-file reopenings #3.
- Thomas Munro replaced the separate APIs with a synthetic PG_O_DIRECT flag, checked for collisions and stripped before open(), and returned -1 on F_NOCACHE failure #4; he retained the existing best-effort behavior on unsupported platforms, leaving stricter checks for future explicit configuration options #5.
- Thomas Munro selected the synthetic-flag approach #6, and Andres Freund considered a complete internal-to-OS flag translation unnecessarily broad #7; the revised patch #4 landed with only comment, whitespace, and commit-message edits as 2dbe890571, announced in #8.
- After landing, Tom Lane reported that the prairiedog buildfarm system lacked some flags referenced by the assertion #9, and Thomas Munro reported fixing that problem #10.
- Tom Lane then recommended avoiding conditional preprocessing inside StaticAssertStmt arguments and supplied an inline example using separate assertions #12; Thomas Munro implemented that precaution in 0c08856856 and confirmed completion in #13.
- Thomas Munro also submitted a new Solaris directio(DIRECTIO_ON) extension, accompanied by diagnostic changes that let him exercise the Solaris path on Illumos by undefining O_DIRECT #13.
- Tom Lane tested the Solaris extension and reported clean compilation but very poor synchronous-I/O performance and unavailable direct-I/O cases in pg_test_fsync #15.
- Thomas Munro attributed the direct-I/O rejection to closed-source ZFS limitations and put the Solaris work on hold, leaving the macOS support and portability fixes landed while independent direct-I/O controls and cross-platform WAL-method selection remained open questions #16.