1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-28 11:55:03 +03:00

Avoid assuming there will be only 3 states for synchronous_commit.

Also avoid hardcoding the current default state by giving it the name
"on" and replace with a meaningful name that reflects its behaviour.
Coding only, no change in behaviour.
This commit is contained in:
Simon Riggs
2011-04-04 23:23:13 +01:00
parent 479ee1b962
commit 88f32b7ca2
5 changed files with 10 additions and 7 deletions

View File

@@ -54,11 +54,14 @@ extern bool XactDeferrable;
typedef enum
{
SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
SYNCHRONOUS_COMMIT_LOCAL, /* wait for only local flush */
SYNCHRONOUS_COMMIT_ON /* wait for local flush and sync rep */
SYNCHRONOUS_COMMIT_OFF, /* asynchronous commit */
SYNCHRONOUS_COMMIT_LOCAL_FLUSH, /* wait for local flush only */
SYNCHRONOUS_COMMIT_REMOTE_FLUSH /* wait for local and remote flush */
} SyncCommitLevel;
/* Define the default setting for synchonous_commit */
#define SYNCHRONOUS_COMMIT_ON SYNCHRONOUS_COMMIT_REMOTE_FLUSH
/* Synchronous commit level */
extern int synchronous_commit;