model-writtenrun 8308 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Janes reported that pg_test_fsync failed during open_datasync testing on PostgreSQL 12 under Windows, whereas PostgreSQL 11 completed with potentially incorrect results #1.
- Michael Paquier traced the failure to text mode interacting with unbuffered writes and proposed passing PG_BINARY explicitly to every open() call #2; his attached patch implemented that approach to avoid translation of random test data #3.
- Bruce Momjian supported binary mode because the tool measures binary writes and text translation adds unwanted overhead #5; Michael proposed backpatching through PostgreSQL 9.5 because all those versions used text mode #6.
- Michael left incorrect O_DSYNC handling in PostgreSQL 11 and older unresolved because backpatching the broader frontend file-opening changes could break other client applications, while retaining the binary-mode fix for all supported branches #8; Bruce agreed #9.
- Michael committed the attached patch unchanged as 932f9fb504, with backports through PostgreSQL 9.5, and closed the thread by confirming the fix #10; the commit records manual MSVC validation and leaves automated tests as future work.