mirror of
https://github.com/postgres/postgres.git
synced 2025-06-19 04:21:08 +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:
@ -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;
|
||||
|
Reference in New Issue
Block a user