diff options
author | Tom Lane | 2008-05-17 17:24:57 +0000 |
---|---|---|
committer | Tom Lane | 2008-05-17 17:24:57 +0000 |
commit | 1a604b4e3101e7e4327676144963f2a8fdb5722b (patch) | |
tree | 98ef89f9c875bca8a0d6a6ac581d329431b2e1f3 | |
parent | 55f6f8f2aa437a28e4d8a590bfbebe371bd75109 (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.c | 4 | ||||
-rw-r--r-- | src/include/access/xlogdefs.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 42a4befba1..507ae272e8 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.310 2008/05/16 19:15:05 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.311 2008/05/17 17:24:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -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 285890bbd6..99db0bcffc 100644 --- a/src/include/access/xlogdefs.h +++ b/src/include/access/xlogdefs.h @@ -7,11 +7,13 @@ * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.21 2008/05/17 16:49:23 tgl Exp $ + * $PostgreSQL: pgsql/src/include/access/xlogdefs.h,v 1.22 2008/05/17 17:24:57 tgl Exp $ */ #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. |