aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execReplication.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2020-04-11 10:30:00 -0700
committerNoah Misch <noah@leadboat.com>2020-04-11 10:30:00 -0700
commit421685812290406daea58b78dfab0346eb683bbb (patch)
tree84e435a42fb61d2363c725f35bccb4c3d575846e /src/backend/executor/execReplication.c
parent969f9d0b4ba574bb8df65683dbf7a09c030f3e67 (diff)
downloadpostgresql-421685812290406daea58b78dfab0346eb683bbb.tar.gz
postgresql-421685812290406daea58b78dfab0346eb683bbb.zip
When WalSndCaughtUp, sleep only in WalSndWaitForWal().
Before sleeping, WalSndWaitForWal() sends a keepalive if MyWalSnd->write < sentPtr. That is important in logical replication. When the latest physical LSN yields no logical replication messages (a common case), that keepalive elicits a reply, and processing the reply updates pg_stat_replication.replay_lsn. WalSndLoop() lacks that; when WalSndLoop() slept, replay_lsn advancement could stall until wal_receiver_status_interval elapsed. This sometimes stalled src/test/subscription/t/001_rep_changes.pl for up to 10s. Discussion: https://postgr.es/m/20200406063649.GA3738151@rfd.leadboat.com
Diffstat (limited to 'src/backend/executor/execReplication.c')
0 files changed, 0 insertions, 0 deletions