aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xact.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/access/xact.h')
-rw-r--r--src/include/access/xact.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 902e99e815c..1685a0167f5 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -32,15 +32,26 @@ extern int DefaultXactIsoLevel;
extern int XactIsoLevel;
/*
- * We only implement two isolation levels internally. This macro should
- * be used to check which one is selected.
+ * We implement three isolation levels internally.
+ * The two stronger ones use one snapshot per database transaction;
+ * the others use one snapshot per statement.
+ * Serializable uses predicate locks in addition to snapshots.
+ * These macros should be used to check which isolation level is selected.
*/
#define IsolationUsesXactSnapshot() (XactIsoLevel >= XACT_REPEATABLE_READ)
+#define IsolationIsSerializable() (XactIsoLevel == XACT_SERIALIZABLE)
/* Xact read-only state */
extern bool DefaultXactReadOnly;
extern bool XactReadOnly;
+/*
+ * Xact is deferrable -- only meaningful (currently) for read only
+ * SERIALIZABLE transactions
+ */
+extern bool DefaultXactDeferrable;
+extern bool XactDeferrable;
+
/* Asynchronous commits */
extern bool XactSyncCommit;