Fix over-eager ping'ing in logical replication receiver.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Sep 2020 00:20:06 +0000 (20:20 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 5 Sep 2020 00:20:06 +0000 (20:20 -0400)
commit9b8a8516ed2e4268026a826c5e9b768f88aa67aa
tree3f85c2ee61d2383287248fd9978f9924767536b6
parent63abf9ad9b41f91a96d6eb9bc1c0c49877f1d854
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