From 5c11725867ac3cb06db065f7940143114280649c Mon Sep 17 00:00:00 2001 From: Simon Riggs Date: Sun, 2 Dec 2012 19:39:37 +0000 Subject: Rearrange storage of data in xl_running_xacts. Previously we stored all xids mixed together. Now we store top-level xids first, followed by all subxids. Also skip logging any subxids if the snapshot is suboverflowed, since there are potentially large numbers of them and they are not useful in that case anyway. Has value in the envisaged design for decoding of WAL. No planned effect on Hot Standby. Andres Freund, reviewed by me --- src/backend/access/transam/xlog.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/backend/access/transam/xlog.c') diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index f78a0882deb..f090baed4f1 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5631,6 +5631,7 @@ StartupXLOG(void) * subxids are listed with their parent prepared transactions. */ running.xcnt = nxids; + running.subxcnt = 0; running.subxid_overflow = false; running.nextXid = checkPoint.nextXid; running.oldestRunningXid = oldestActiveXID; @@ -7834,6 +7835,7 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record) * with their parent prepared transactions. */ running.xcnt = nxids; + running.subxcnt = 0; running.subxid_overflow = false; running.nextXid = checkPoint.nextXid; running.oldestRunningXid = oldestActiveXID; -- cgit v1.2.3