Fix over-eager ping'ing in logical replication receiver.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Sep 2020 00:20:05 +0000 (20:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Sep 2020 00:33:37 +0000 (20:33 -0400)
commit9b81a30f924cf30e6bf3abb3366706440351e163
tree81fac1408fb62d45c38a40b40e3bb0fc665fb14d
parent4a4f3bf983b4abd908585a8d752eee0e47627034
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
src/backend/replication/logical/worker.c