diff options
Diffstat (limited to 'src/backend/access')
| -rw-r--r-- | src/backend/access/transam/xact.c | 5 | ||||
| -rw-r--r-- | src/backend/access/transam/xlog.c | 39 |
2 files changed, 14 insertions, 30 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index ca66b0afaf..d6176ec5c4 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.120 2002/04/01 03:34:25 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.121 2002/05/17 01:19:16 tgl Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -173,6 +173,7 @@ #include "storage/proc.h" #include "storage/sinval.h" #include "storage/smgr.h" +#include "utils/guc.h" #include "utils/inval.h" #include "utils/memutils.h" #include "utils/portal.h" @@ -1002,6 +1003,7 @@ CommitTransaction(void) RelationPurgeLocalRelation(true); smgrDoPendingDeletes(true); + AtEOXact_GUC(true); AtEOXact_SPI(); AtEOXact_gist(); AtEOXact_hash(); @@ -1104,6 +1106,7 @@ AbortTransaction(void) RelationPurgeLocalRelation(false); smgrDoPendingDeletes(false); + AtEOXact_GUC(false); AtEOXact_SPI(); AtEOXact_gist(); AtEOXact_hash(); diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index eca4a5de5f..77ad566ba8 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.94 2002/05/09 13:30:24 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.95 2002/05/17 01:19:16 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3272,31 +3272,10 @@ xlog_outrec(char *buf, XLogRecord *record) /* - * GUC support routines + * GUC support */ - -bool -check_xlog_sync_method(const char *method) -{ - if (strcasecmp(method, "fsync") == 0) - return true; -#ifdef HAVE_FDATASYNC - if (strcasecmp(method, "fdatasync") == 0) - return true; -#endif -#ifdef OPEN_SYNC_FLAG - if (strcasecmp(method, "open_sync") == 0) - return true; -#endif -#ifdef OPEN_DATASYNC_FLAG - if (strcasecmp(method, "open_datasync") == 0) - return true; -#endif - return false; -} - -void -assign_xlog_sync_method(const char *method) +const char * +assign_xlog_sync_method(const char *method, bool doit, bool interactive) { int new_sync_method; int new_sync_bit; @@ -3329,12 +3308,12 @@ assign_xlog_sync_method(const char *method) #endif else { - /* Can't get here unless guc.c screwed up */ - elog(ERROR, "bogus wal_sync_method %s", method); - new_sync_method = 0; /* keep compiler quiet */ - new_sync_bit = 0; + return NULL; } + if (!doit) + return method; + if (sync_method != new_sync_method || open_sync_bit != new_sync_bit) { /* @@ -3359,6 +3338,8 @@ assign_xlog_sync_method(const char *method) sync_method = new_sync_method; open_sync_bit = new_sync_bit; } + + return method; } |
