Skip to content

Commit 6d6c372

Browse files
committed
Make code for selecting default WAL sync method less confusing.
1 parent 96b85f1 commit 6d6c372

File tree

1 file changed

+6
-6
lines changed
  • src/backend/access/transam

1 file changed

+6
-6
lines changed

src/backend/access/transam/xlog.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.220 2005/10/15 02:49:10 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.221 2005/10/22 20:27:17 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -99,14 +99,14 @@
9999
#define DEFAULT_SYNC_METHOD_STR "fdatasync"
100100
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FDATASYNC
101101
#define DEFAULT_SYNC_FLAGBIT 0
102-
#elif !defined(HAVE_FSYNC_WRITETHROUGH_ONLY)
103-
#define DEFAULT_SYNC_METHOD_STR "fsync"
104-
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC
105-
#define DEFAULT_SYNC_FLAGBIT 0
106-
#else
102+
#elif defined(HAVE_FSYNC_WRITETHROUGH_ONLY)
107103
#define DEFAULT_SYNC_METHOD_STR "fsync_writethrough"
108104
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC_WRITETHROUGH
109105
#define DEFAULT_SYNC_FLAGBIT 0
106+
#else
107+
#define DEFAULT_SYNC_METHOD_STR "fsync"
108+
#define DEFAULT_SYNC_METHOD SYNC_METHOD_FSYNC
109+
#define DEFAULT_SYNC_FLAGBIT 0
110110
#endif
111111

112112

0 commit comments

Comments
 (0)