Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b8e7c3

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 parent37862be commit9b8e7c3

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
inti;
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
returnsnapshot;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp