summaryrefslogtreecommitdiff
path: root/src/include/access/xlogdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/xlogdefs.h')
-rw-r--r--src/include/access/xlogdefs.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index a47e3eeb1f5..810cd1fd86a 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -69,28 +69,12 @@ typedef uint16 RepOriginId;
* are available on the current platform, and to choose an appropriate
* default method. We assume that fsync() is always available, and that
* configure determined whether fdatasync() is.
+ *
+ * Note that we define our own O_DSYNC on Windows, but not O_SYNC.
*/
-#if defined(O_SYNC)
-#define OPEN_SYNC_FLAG O_SYNC
-#elif defined(O_FSYNC)
-#define OPEN_SYNC_FLAG O_FSYNC
-#endif
-
-#if defined(O_DSYNC)
-#if defined(OPEN_SYNC_FLAG)
-/* O_DSYNC is distinct? */
-#if O_DSYNC != OPEN_SYNC_FLAG
-#define OPEN_DATASYNC_FLAG O_DSYNC
-#endif
-#else /* !defined(OPEN_SYNC_FLAG) */
-/* Win32 only has O_DSYNC */
-#define OPEN_DATASYNC_FLAG O_DSYNC
-#endif
-#endif
-
#if defined(PLATFORM_DEFAULT_SYNC_METHOD)
#define DEFAULT_SYNC_METHOD PLATFORM_DEFAULT_SYNC_METHOD
-#elif defined(OPEN_DATASYNC_FLAG)
+#elif defined(O_DSYNC) && (!defined(O_SYNC) || O_DSYNC != O_SYNC)
#define DEFAULT_SYNC_METHOD SYNC_METHOD_OPEN_DSYNC
#elif defined(HAVE_FDATASYNC)
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC