]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix a few more redundant calls of GetLatestSnapshot()
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 10 Mar 2025 16:54:58 +0000 (18:54 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Mon, 10 Mar 2025 17:00:08 +0000 (19:00 +0200)
Commit 2367503177 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

src/backend/executor/execReplication.c

index 9a57698d2218a06c2b0e4598ef4f9ea31b21be60..cb1202e4506785a453bea7f254f444c6baf4e7a7 100644 (file)
@@ -434,7 +434,7 @@ retry:
 
                PushActiveSnapshot(GetLatestSnapshot());
 
-               res = table_tuple_lock(rel, &(outslot->tts_tid), GetLatestSnapshot(),
+               res = table_tuple_lock(rel, &(outslot->tts_tid), GetActiveSnapshot(),
                                                           outslot,
                                                           GetCurrentCommandId(false),
                                                           lockmode,