From fa8692fc1b0bd41c32c38e936cb0cf7a48c8be0f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 17 May 2008 17:24:57 +0000 Subject: [PATCH] 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 , leading to wrong determination of DEFAULT_SYNC_METHOD. Obviously xlogdefs.h needs to include for itself to ensure stable results. --- src/backend/access/transam/xlog.c | 2 -- src/include/access/xlogdefs.h | 2 ++ 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 -#include #include #include #include @@ -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 /* 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. -- 2.39.5