Skip to content

Commit 9b8e7c3

Browse files
committed
Touch global snapshots csn->xmin map only when track_global_snapshots.
Actually we should allow this -- it might make sense for hot standby. (cherry picked from commit 109b20b09e3b7e10015ffa13b7b8cd71345ddfea)
1 parent 37862be commit 9b8e7c3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/backend/access/transam/global_snapshot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ GlobalSnapshotStartup(TransactionId oldestActiveXID)
181181
* Run only if we have initialized shared memory and gsXidMap
182182
* is enabled.
183183
*/
184-
if (IsNormalProcessingMode() && global_snapshot_defer_time > 0)
184+
if (IsNormalProcessingMode() && track_global_snapshots &&
185+
global_snapshot_defer_time > 0)
185186
{
186187
int i;
187188

src/backend/storage/ipc/procarray.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,8 @@ GetSnapshotData(Snapshot snapshot)
18471847
snapshot->imported_global_csn = false;
18481848
snapshot->global_csn = global_csn;
18491849
/* if (global_snapshot_defer_time > 0 && IsNormalProcessingMode()) */
1850-
if (global_snapshot_defer_time > 0 && IsUnderPostmaster)
1850+
if (track_global_snapshots && global_snapshot_defer_time > 0 &&
1851+
IsUnderPostmaster)
18511852
GlobalSnapshotMapXmin(snapshot->global_csn);
18521853

18531854
return snapshot;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy