Fix over-eager ping'ing in logical replication receiver.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9b81a30f924cf30e6bf3abb3366706440351e163
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2020-09-05T00:33:37Z
Releases: 13.0
Fix over-eager ping'ing in logical replication receiver.

Commit 3f60f690f only partially fixed the broken-status-tracking
issue in LogicalRepApplyLoop: we need ping_sent to have the same
lifetime as last_recv_timestamp.  The effects are much less serious
than what that commit fixed, though.  AFAICS this would just lead to
extra ping requests being sent, once per second until the sender
responds.  Still, it's a bug, so backpatch to v10 as before.

Discussion: https://postgr.es/m/959627.1599248476@sss.pgh.pa.us

Files

PathChange+/−
src/backend/replication/logical/worker.c modified +4 −6

Discussion