aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlog.c
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2012-12-02 19:39:37 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2012-12-02 19:39:37 +0000
commit5c11725867ac3cb06db065f7940143114280649c (patch)
tree0c7ab755446364e267930446dc17b2e63739631f /src/backend/access/transam/xlog.c
parentc11130690d6dca64267201a169cfb38c1adec5ef (diff)
downloadpostgresql-5c11725867ac3cb06db065f7940143114280649c.tar.gz
postgresql-5c11725867ac3cb06db065f7940143114280649c.zip
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
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r--src/backend/access/transam/xlog.c2
1 files changed, 2 insertions, 0 deletions
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;