Re: Lost walsender wakeup stalls synchronous commits until the standby's next reply (16+)

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Alex Speller <alex(at)alexspeller(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Lost walsender wakeup stalls synchronous commits until the standby's next reply (16+)
Date: 2026-11-02 16:05:35
Message-ID: CAHGQGwEyKVjf6uYyq80HXNwK1jSfz=7K13ZtatYOpk__HXivYg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Nov 2, 2026 at 7:44 PM Alex Speller <alex(at)alexspeller(dot)com> wrote:
> The attached patch rechecks after joining the waitlist.

Thanks for the report and patch!
The patch looks good to me, except for one comment.

Cascading walsenders also seem to miss wakeups for promotion or
a timeline switch, even when the flush position has not advanced.
Is that right? If so, I think we should recheck those conditions after
joining the waitlist as well.

I've attached an updated patch with these checks and a few
cosmetic changes. Thought?

> WalSndWaitForWal() (logical) reads the flush pointer before WalSndWait() in the same way.

Yes, so logical replication seems to have a similar issue.
I'll investigate that separately.

Regards,

--
Fujii Masao

Attachment Content-Type Size
v2-0001-Fix-lost-wakeups-in-physical-WAL-senders.patch application/octet-stream 3.2 KB
nocfbot-v2-0001-PG16-Fix-lost-wakeups-in-physical-WAL-senders.patch application/octet-stream 3.1 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robins Tharakan 2026-11-02 16:08:35 Re: BUG #19827: postgres_fdw: Assert in add_foreign_ordered_paths() with redundant ORDER BY in set-op input
Previous Message Venu K 2026-11-02 15:39:37 Re: BUG #19826: corr()/regr_r2() of constant input: NULL serially, 1 with partial aggregation