aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xact.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-08-01 22:45:09 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-08-01 22:45:09 +0000
commit4a78cdeb6b598940e9d9adb92deca6494628802a (patch)
tree0c8ad45eea297dcbc647705265eab8188fd4d8b1 /src/include/access/xact.h
parentc722628a430f347ff4a30419004cddc9795a3bb6 (diff)
downloadpostgresql-4a78cdeb6b598940e9d9adb92deca6494628802a.tar.gz
postgresql-4a78cdeb6b598940e9d9adb92deca6494628802a.zip
Support an optional asynchronous commit mode, in which we don't flush WAL
before reporting a transaction committed. Data consistency is still guaranteed (unlike setting fsync = off), but a crash may lose the effects of the last few transactions. Patch by Simon, some editorialization by Tom.
Diffstat (limited to 'src/include/access/xact.h')
-rw-r--r--src/include/access/xact.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index 759eab1a3d9..e8e2b08de42 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.87 2007/04/30 21:01:53 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/access/xact.h,v 1.88 2007/08/01 22:45:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -41,6 +41,9 @@ extern int XactIsoLevel;
extern bool DefaultXactReadOnly;
extern bool XactReadOnly;
+/* Asynchronous commits */
+extern bool XactSyncCommit;
+
/*
* start- and end-of-transaction callbacks for dynamically loaded modules
*/
@@ -147,6 +150,7 @@ extern void SetCurrentStatementStartTimestamp(void);
extern int GetCurrentTransactionNestLevel(void);
extern bool TransactionIdIsCurrentTransactionId(TransactionId xid);
extern void CommandCounterIncrement(void);
+extern void ForceSyncCommit(void);
extern void StartTransactionCommand(void);
extern void CommitTransactionCommand(void);
extern void AbortCurrentTransaction(void);