slotfuncs.c: Don't set ThisTimeLineID.
authorRobert Haas <[email protected]>
Wed, 27 Oct 2021 21:03:44 +0000 (17:03 -0400)
committerRobert Haas <[email protected]>
Thu, 28 Oct 2021 18:55:18 +0000 (14:55 -0400)
Nothing in this file cares whether we set this global variable or not,
so let's just not set it.

src/backend/replication/slotfuncs.c

index 29e8189326777aba090821d3a4b9ab64d4cd4ac0..a80298ba53dea2966c6c17a57733611e365c4e23 100644 (file)
@@ -625,9 +625,9 @@ pg_replication_slot_advance(PG_FUNCTION_ARGS)
         * target position accordingly.
         */
        if (!RecoveryInProgress())
-               moveto = Min(moveto, GetFlushRecPtr(&ThisTimeLineID));
+               moveto = Min(moveto, GetFlushRecPtr(NULL));
        else
-               moveto = Min(moveto, GetXLogReplayRecPtr(&ThisTimeLineID));
+               moveto = Min(moveto, GetXLogReplayRecPtr(NULL));
 
        /* Acquire the slot so we "own" it */
        ReplicationSlotAcquire(NameStr(*slotname), true);