aboutsummaryrefslogtreecommitdiff
path: root/src/include/port/linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/port/linux.h')
-rw-r--r--src/include/port/linux.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/port/linux.h b/src/include/port/linux.h
index b9498b239df..bcaa42dc4ed 100644
--- a/src/include/port/linux.h
+++ b/src/include/port/linux.h
@@ -12,3 +12,11 @@
* to have a kernel version test here.
*/
#define HAVE_LINUX_EIDRM_BUG
+
+/*
+ * Set the default wal_sync_method to fdatasync. With recent Linux versions,
+ * xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't
+ * perform better and (b) causes outright failures on ext4 data=journal
+ * filesystems, because those don't support O_DIRECT.
+ */
+#define PLATFORM_DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC