summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2008-05-17 17:24:57 +0000
committerTom Lane2008-05-17 17:24:57 +0000
commitfa8692fc1b0bd41c32c38e936cb0cf7a48c8be0f (patch)
treeb83f67e79c615150c80875e1324010d04997da71
parent88f215a8e4b13403462ec5e1b7ee77cfa8e07c59 (diff)
Fix a subtle bug exposed by recent wal_sync_method rearrangements.
Formerly, the default value of wal_sync_method was determined inside xlog.c, but now it is determined inside guc.c. guc.c was reading xlogdefs.h without having read <fcntl.h>, leading to wrong determination of DEFAULT_SYNC_METHOD. Obviously xlogdefs.h needs to include <fcntl.h> for itself to ensure stable results.
-rw-r--r--src/backend/access/transam/xlog.c2
-rw-r--r--src/include/access/xlogdefs.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 910e0d4ab0..c25cdc90a9 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -15,7 +15,6 @@
#include "postgres.h"
#include <ctype.h>
-#include <fcntl.h>
#include <signal.h>
#include <time.h>
#include <sys/stat.h>
@@ -31,7 +30,6 @@
#include "access/twophase.h"
#include "access/xact.h"
#include "access/xlog_internal.h"
-#include "access/xlogdefs.h"
#include "access/xlogutils.h"
#include "catalog/catversion.h"
#include "catalog/pg_control.h"
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 5e03eb5e88..57b215801a 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -12,6 +12,8 @@
#ifndef XLOG_DEFS_H
#define XLOG_DEFS_H
+#include <fcntl.h> /* need open() flags */
+
/*
* Pointer to a location in the XLOG. These pointers are 64 bits wide,
* because we don't want them ever to overflow.