diff options
author | Robert Haas <rhaas@postgresql.org> | 2011-04-04 16:13:01 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2011-04-04 16:25:52 -0400 |
commit | 240067b3b0ff989d2b28f4f917f7958f2ec76b05 (patch) | |
tree | 385e0e13abda1024fc6a5cd8a81583a3a86366bd /src/backend/access/transam/xact.c | |
parent | fc3459d70c5d842fe6519522649c8a47454f25bb (diff) | |
download | postgresql-240067b3b0ff989d2b28f4f917f7958f2ec76b05.tar.gz postgresql-240067b3b0ff989d2b28f4f917f7958f2ec76b05.zip |
Merge synchronous_replication setting into synchronous_commit.
This means one less thing to configure when setting up synchronous
replication, and also avoids some ambiguity around what the behavior
should be when the settings of these variables conflict.
Fujii Masao, with additional hacking by me.
Diffstat (limited to 'src/backend/access/transam/xact.c')
-rw-r--r-- | src/backend/access/transam/xact.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index c8b582cce8e..503506f1f0d 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -68,7 +68,7 @@ bool XactReadOnly; bool DefaultXactDeferrable = false; bool XactDeferrable; -bool XactSyncCommit = true; +int synchronous_commit = SYNCHRONOUS_COMMIT_ON; int CommitDelay = 0; /* precommit delay in microseconds */ int CommitSiblings = 5; /* # concurrent xacts needed to sleep */ @@ -1056,7 +1056,8 @@ RecordTransactionCommit(void) * if all to-be-deleted tables are temporary though, since they are lost * anyway if we crash.) */ - if ((wrote_xlog && XactSyncCommit) || forceSyncCommit || nrels > 0 || SyncRepRequested()) + if ((wrote_xlog && synchronous_commit >= SYNCHRONOUS_COMMIT_LOCAL) || + forceSyncCommit || nrels > 0) { /* * Synchronous commit case: |