Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f7c566a

Browse files
committed
Fix a few more redundant calls of GetLatestSnapshot()
Commit 2367503 fixed this in RelationFindReplTupleByIndex(), but I missed two other similar cases. Per report from Ranier Vilela. Discussion: https://www.postgresql.org/message-id/CAEudQArUT1dE45WN87F-Gb7XMy_hW6x1DFd3sqdhhxP-RMDa0Q@mail.gmail.com Backpatch-through: 13
1 parent 2367503 commit f7c566a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/executor/execReplication.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ RelationFindReplTupleSeq(Relation rel, LockTupleMode lockmode,
411411

412412
PushActiveSnapshot(GetLatestSnapshot());
413413

414-
res = table_tuple_lock(rel, &(outslot->tts_tid), GetLatestSnapshot(),
414+
res = table_tuple_lock(rel, &(outslot->tts_tid), GetActiveSnapshot(),
415415
outslot,
416416
GetCurrentCommandId(false),
417417
lockmode,
@@ -468,7 +468,7 @@ FindConflictTuple(ResultRelInfo *resultRelInfo, EState *estate,
468468

469469
PushActiveSnapshot(GetLatestSnapshot());
470470

471-
res = table_tuple_lock(rel, &conflictTid, GetLatestSnapshot(),
471+
res = table_tuple_lock(rel, &conflictTid, GetActiveSnapshot(),
472472
*conflictslot,
473473
GetCurrentCommandId(false),
474474
LockTupleShare,

0 commit comments

Comments
 (0)