| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Wake up backends immediately when sync standbys decrease |
| Date: | 2026-02-02 16:03:49 |
| Message-ID: | CAHGQGwFauFYyxZy9+s89U+NRRPPw7V7fK2K_qGzWinJJG=Rhyw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sun, Feb 1, 2026 at 3:25 PM Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> wrote:
>
> Thank you for the reviews!
>
> On Sat, Jan 31, 2026 at 12:28 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)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 already duplicated 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.
Thanks for updating the patch! It looks good to me.
I've run pgindent and updated the commit log slightly. The revised patch is
attached. I'll commit it.
As noted in the commit log of the latest patch, I think this an improvement
rather than a bug fix, so I plan to apply it only to the master branch.
Regards,
--
Fujii Masao
| Attachment | Content-Type | Size |
|---|---|---|
| v3-0001-Release-synchronous-replication-waiters-immediate.patch | application/octet-stream | 3.9 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Vitaly Davydov | 2026-02-02 16:04:32 | Re: Support logical replication of DDLs |
| Previous Message | Tomas Vondra | 2026-02-02 15:57:26 | Re: Is there value in having optimizer stats for joins/foreignkeys? |