diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2012-12-02 19:39:37 +0000 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2012-12-02 19:39:37 +0000 |
commit | 5c11725867ac3cb06db065f7940143114280649c (patch) | |
tree | 0c7ab755446364e267930446dc17b2e63739631f /src/include | |
parent | c11130690d6dca64267201a169cfb38c1adec5ef (diff) | |
download | postgresql-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/include')
-rw-r--r-- | src/include/storage/standby.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/storage/standby.h b/src/include/storage/standby.h index 7024fc4f3c2..f917b89f7e1 100644 --- a/src/include/storage/standby.h +++ b/src/include/storage/standby.h @@ -68,6 +68,7 @@ typedef struct xl_standby_locks typedef struct xl_running_xacts { int xcnt; /* # of xact ids in xids[] */ + int subxcnt; /* # of subxact ids in xids[] */ bool subxid_overflow; /* snapshot overflowed, subxids missing */ TransactionId nextXid; /* copy of ShmemVariableCache->nextXid */ TransactionId oldestRunningXid; /* *not* oldestXmin */ @@ -98,6 +99,7 @@ extern void standby_desc(StringInfo buf, uint8 xl_info, char *rec); typedef struct RunningTransactionsData { int xcnt; /* # of xact ids in xids[] */ + int subxcnt; /* # of subxact ids in xids[] */ bool subxid_overflow; /* snapshot overflowed, subxids missing */ TransactionId nextXid; /* copy of ShmemVariableCache->nextXid */ TransactionId oldestRunningXid; /* *not* oldestXmin */ |