aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/replication/logical/worker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 11e6331f494..ff623036388 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -1089,6 +1089,8 @@ UpdateWorkerStats(XLogRecPtr last_lsn, TimestampTz send_time, bool reply)
static void
LogicalRepApplyLoop(XLogRecPtr last_received)
{
+ TimestampTz last_recv_timestamp = GetCurrentTimestamp();
+
/*
* Init the ApplyMessageContext which we clean up after each replication
* protocol message.
@@ -1107,7 +1109,6 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
int len;
char *buf = NULL;
bool endofstream = false;
- TimestampTz last_recv_timestamp = GetCurrentTimestamp();
bool ping_sent = false;
long wait_time;