Add wal_sync_method=fdatasync for Windows.
Thomas Munro <tmunro@postgresql.org>
Add wal_sync_method=fdatasync for Windows. Windows 10 gained support for flushing NTFS files with fdatasync() semantics. The main advantage over open_datasync (in Windows API terms FILE_FLAG_WRITE_THROUGH) is that the latter does not flush SATA drive caches. The default setting is not changed, so users have to opt in to this. Discussion: https://postgr.es/m/CA%2BhUKGJZJVO%3DiX%2Beb-PXi2_XS9ZRqnn_4URh0NUQOwt6-_51xQ%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| configure | modified | +6 −0 |
| configure.ac | modified | +1 −0 |
| doc/src/sgml/wal.sgml | modified | +2 −1 |
| src/include/c.h | modified | +1 −1 |
| src/include/port/win32ntdll.h | modified | +9 −1 |
| src/include/port/win32_port.h | modified | +6 −0 |
| src/port/fdatasync.c | added | +53 −0 |
| src/port/win32ntdll.c | modified | +5 −1 |
| src/tools/msvc/Mkvcbuild.pm | modified | +2 −1 |
| src/tools/msvc/Solution.pm | modified | +1 −1 |
Documentation touched
Discussion
- Windows now has fdatasync() 28 messages · 2021-12-12 → 2022-08-10