summaryrefslogtreecommitdiff
path: root/src/include/access/clog.h
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2008-10-20 19:18:18 +0000
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2008-10-20 19:18:18 +0000
commit06da3c570f21394003fc392d80f54862f7dec19f (patch)
tree2e4c5dc1cb78d87e12fc1495b084bfaf5e69e737 /src/include/access/clog.h
parent3afffbc902f16f5b9abd2464a2bbc17d9bc63316 (diff)
downloadpostgresql-06da3c570f21394003fc392d80f54862f7dec19f.tar.gz
Rework subtransaction commit protocol for hot standby.
This patch eliminates the marking of subtransactions as SUBCOMMITTED in pg_clog during their commit; instead they remain in-progress until main transaction commit. At main transaction commit, the commit protocol is atomic-by-page instead of one transaction at a time. To avoid a race condition with some subtransactions appearing committed before others in the case where they span more than one pg_clog page, we conserve the logic that marks them subcommitted before marking the parent committed. Simon Riggs with minor help from me
Diffstat (limited to 'src/include/access/clog.h')
-rw-r--r--src/include/access/clog.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/access/clog.h b/src/include/access/clog.h
index 8b640a39d6..ac74c47132 100644
--- a/src/include/access/clog.h
+++ b/src/include/access/clog.h
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.21 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/access/clog.h,v 1.22 2008/10/20 19:18:18 alvherre Exp $
*/
#ifndef CLOG_H
#define CLOG_H
@@ -32,7 +32,8 @@ typedef int XidStatus;
#define NUM_CLOG_BUFFERS 8
-extern void TransactionIdSetStatus(TransactionId xid, XidStatus status, XLogRecPtr lsn);
+extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
+ TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
extern Size CLOGShmemSize(void);