pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix remote_apply waits with wal_receiver_status_interval set to
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix remote_apply waits with wal_receiver_status_interval set to
@ 2026-10-07 10:12  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2026-10-07 10:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix remote_apply waits with wal_receiver_status_interval set to zero

With synchronous_commit = remote_apply, a commit could remain blocked even
after the synchronous standby had applied it when
wal_receiver_status_interval was set to zero. With both
wal_sender_timeout and wal_receiver_timeout disabled, the wait could last
indefinitely.

Commit 400a790a48e introduced this regression while avoiding unnecessary
duplicate standby status replies. It changed apply notifications from forced
replies to replies that check for WAL position changes. However,
XLogWalRcvSendReply() still returned early for non-forced replies when
wal_receiver_status_interval was zero, before checking the apply position.

Fix this by allowing apply-notification requests to bypass the early return
while preserving the existing checks that suppress unnecessary duplicate
replies.

Author: Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CA+vB=AHKUhc9GCDwoLr=SshTBCQG09kp8TEXew50UtD5rYqowg@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/cc33773482e879ea746256cc344ab029df1243d9

Modified Files
--------------
src/backend/replication/walreceiver.c              | 11 ++--
src/test/recovery/meson.build                      |  1 +
.../recovery/t/059_remote_apply_status_interval.pl | 68 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix remote_apply waits with wal_receiver_status_interval set to
@ 2026-10-07 10:12  Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Fujii Masao @ 2026-10-07 10:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix remote_apply waits with wal_receiver_status_interval set to zero

With synchronous_commit = remote_apply, a commit could remain blocked even
after the synchronous standby had applied it when
wal_receiver_status_interval was set to zero. With both
wal_sender_timeout and wal_receiver_timeout disabled, the wait could last
indefinitely.

Commit 400a790a48e introduced this regression while avoiding unnecessary
duplicate standby status replies. It changed apply notifications from forced
replies to replies that check for WAL position changes. However,
XLogWalRcvSendReply() still returned early for non-forced replies when
wal_receiver_status_interval was zero, before checking the apply position.

Fix this by allowing apply-notification requests to bypass the early return
while preserving the existing checks that suppress unnecessary duplicate
replies.

Author: Vaibhav Dalvi <vaibhav.dalvi@enterprisedb.com>
Reviewed-by: Ashutosh Sharma <ashu.coek88@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CA+vB=AHKUhc9GCDwoLr=SshTBCQG09kp8TEXew50UtD5rYqowg@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/00dfee4fd743614c766cbd1d7a524163c225905a

Modified Files
--------------
src/backend/replication/walreceiver.c              | 11 ++--
src/test/recovery/meson.build                      |  1 +
.../recovery/t/059_remote_apply_status_interval.pl | 68 ++++++++++++++++++++++
3 files changed, 75 insertions(+), 5 deletions(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-07 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 10:12 pgsql: Fix remote_apply waits with wal_receiver_status_interval set to Fujii Masao <fujii@postgresql.org>
2026-10-07 10:12 pgsql: Fix remote_apply waits with wal_receiver_status_interval set to Fujii Masao <fujii@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox