diff options
author | Andres Freund <andres@anarazel.de> | 2020-07-15 15:35:07 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2020-08-14 15:33:35 -0700 |
commit | 5788e258bb26495fab65ff3aa486268d1c50b123 (patch) | |
tree | 85c92420fc74c07e1812d033f585fc300098d687 /src/backend/replication/logical/logical.c | |
parent | 941697c3c1ae5d6ee153065adb96e1e63ee11224 (diff) | |
download | postgresql-5788e258bb26495fab65ff3aa486268d1c50b123.tar.gz postgresql-5788e258bb26495fab65ff3aa486268d1c50b123.zip |
snapshot scalability: Move PGXACT->vacuumFlags to ProcGlobal->vacuumFlags.
Similar to the previous commit this increases the chance that data
frequently needed by GetSnapshotData() stays in l2 cache. As we now
take care to not unnecessarily write to ProcGlobal->vacuumFlags, there
should be very few modifications to the ProcGlobal->vacuumFlags array.
Author: Andres Freund <andres@anarazel.de>
Reviewed-By: Robert Haas <robertmhaas@gmail.com>
Reviewed-By: Thomas Munro <thomas.munro@gmail.com>
Reviewed-By: David Rowley <dgrowleyml@gmail.com>
Discussion: https://postgr.es/m/20200301083601.ews6hz5dduc3w2se@alap3.anarazel.de
Diffstat (limited to 'src/backend/replication/logical/logical.c')
-rw-r--r-- | src/backend/replication/logical/logical.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/logical/logical.c b/src/backend/replication/logical/logical.c index 57c5b513ccf..0f6af952f93 100644 --- a/src/backend/replication/logical/logical.c +++ b/src/backend/replication/logical/logical.c @@ -181,7 +181,8 @@ StartupDecodingContext(List *output_plugin_options, if (!IsTransactionOrTransactionBlock()) { LWLockAcquire(ProcArrayLock, LW_EXCLUSIVE); - MyPgXact->vacuumFlags |= PROC_IN_LOGICAL_DECODING; + MyProc->vacuumFlags |= PROC_IN_LOGICAL_DECODING; + ProcGlobal->vacuumFlags[MyProc->pgxactoff] = MyProc->vacuumFlags; LWLockRelease(ProcArrayLock); } |