Re: issue with synchronized_standby_slots

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Alexander Kukushkin <cyberdemn(at)gmail(dot)com>, Fabrice Chapuis <fabrice636861(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: issue with synchronized_standby_slots
Date: 2025-09-09 08:07:18
Message-ID: CAHGQGwFztr_hHUHyKwc2xxoC8o7h9xv6bVsWbt9BCCxyb8sP-Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 9, 2025 at 2:39 PM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> wrote:
> I agree. For synchronized_standby_slots, I think it is acceptable to report only
> parsing errors, because slots could be dropped even after validating the slot
> existence during GUC loading. Additionally, we would report WARNINGs for
> non-existent slots during the wait function anyway (e.g., in
> StandbySlotsHaveCaughtup()).

+1, to also address the issue I reported upthread.

As I understand it, only the walsender and the slot sync worker actually
use synchronized_standby_slots. But in the current code, all processes check
for slot existence via the GUC check hook, which wastes cycles. The proposed
change would eliminate that overhead.

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zsolt Parragi 2025-09-09 08:16:10 Re: OAuth client code doesn't work with Google OAuth
Previous Message Fujii Masao 2025-09-09 07:56:15 Re: pg_restore --no-policies should not restore policies' comment