pgsql: Add wal_sync_method=fdatasync for Windows.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add wal_sync_method=fdatasync for Windows.
Date: 2022-07-20 01:58:33
Message-ID: E1oDyyt-000MJo-VR@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9430fb407bb64cc842e56fb5844265a9343dafba

Modified Files
--------------
configure | 6 +++++
configure.ac | 1 +
doc/src/sgml/wal.sgml | 3 ++-
src/include/c.h | 2 +-
src/include/port/win32_port.h | 6 +++++
src/include/port/win32ntdll.h | 10 +++++++-
src/port/fdatasync.c | 53 +++++++++++++++++++++++++++++++++++++++++++
src/port/win32ntdll.c | 6 ++++-
src/tools/msvc/Mkvcbuild.pm | 3 ++-
src/tools/msvc/Solution.pm | 2 +-
10 files changed, 86 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2022-07-20 04:12:41 pgsql: Fix warnings on Windows.
Previous Message Fujii Masao 2022-07-20 00:59:17 pgsql: Prevent BASE_BACKUP in the middle of another backup in the same