Re: Wake up backends immediately when sync standbys decrease - Mailing list pgsql-hackers

From Shinya Kato
Subject Re: Wake up backends immediately when sync standbys decrease
Date
Msg-id CAOzEurRXO6rEhYRh0tcQha+fxQw3X9EYSV=zMnG1D9Ebnnarng@mail.gmail.com
Whole thread Raw
In response to Re: Wake up backends immediately when sync standbys decrease  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
Thank you for the reviews!

On Sat, Jan 31, 2026 at 12:28 AM Fujii Masao <masao.fujii@gmail.com> wrote:
> This issue can occur not only when the number of sync standbys is reduced,
> but also when the configured standby names change. For example, if the config
> changes from "FIRST 2 (sby1, sby2)" to "FIRST 2 (sby1, sby3)",
> waiters on sby2 should be released immediately. But, currently, there can
> a delay before that happens. Right?

Yes, you're right, so I revised the comments and commit message.

> > My main concern is code duplication. The same block is added in three places. While the existing reload handling is
alreadyduplicated there, adding more logic on top makes the situation a bit worse from a maintenance perspective. 
> >
> > Would it make sense to factor the reload handling into a small helper, for example:
>
> +1

I've updated it in the v2 patch.


--
Best regards,
Shinya Kato
NTT OSS Center

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: slow SELECT expr INTO var in plpgsql
Next
From: Jingtang Zhang
Date:
Subject: Re: Optimize CPU usage of dropping buffers during recovery