Add wal_sync_method=fdatasync for Windows.

Thomas Munro <tmunro@postgresql.org>

Commit: 9430fb407bb64cc842e56fb5844265a9343dafba
Author: Thomas Munro <tmunro@postgresql.org>
Date: 2022-07-20T01:55:52Z
Releases: 16.0
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

PathChange+/−
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