mirror of
https://github.com/postgres/postgres.git
synced 2025-07-17 06:41:09 +03:00
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.
This commit is contained in:
@ -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:
|
||||
|
Reference in New Issue
Block a user