mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user