public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Smith <[email protected]>
To: Yugo Nagata <[email protected]>
Cc: Pgsql Hackers <[email protected]>
Subject: Re: Warn when creating or enabling a subscription with max_logical_replication_workers = 0
Date: Wed, 4 Feb 2026 17:26:25 +1100
Message-ID: <CAHut+Pt5KzE75ZyFZPC2fcb+GRes2DbHAh_vgfdDXoWmEV6hAg@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Wed, Feb 4, 2026 at 4:07 PM Yugo Nagata <[email protected]> wrote:
>
> Hi,
>
> I would like to propose emitting a warning when creating or enabling a
> subscription while max_logical_replication_workers is set to 0. In this
> case, the CREATE/ALTER SUBSCRIPTION command completes successfully without
> any warning, making it difficult to notice that logical replication cannot
> start.
>
> Of course, users can confirm whether logical replication is working by
> checking system views such as pg_stat_replication or pg_stat_subscription.
> However, emitting warnings explicitly in these cases would make this
> situation more visible. We have seen user reports where this behavior
> caused confusion, with users wondering why replication did not start.
>

Hi Nagata-San.

AFAIK the default for `max_logical_replication_workers` is 4. So how
does the maximum get to be 0 unless the user had explicitly configured
it that way?

Also subscriptions require multiple workers in order to work properly
[1] so why check only 0? Why not check 1 or 2 or 3.... those low
numbers are also likely to cause similar problems aren't they?

And what about when the  `max_logical_replication_workers` is 100, but
those 100 are already being used. IOW, would it be more useful to warn
when you do not have enough *available* workers for the Subscription
to function properly, rather than checking what the maximum value is
set to?

======
[1]  https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-MAX-LOGICAL-REPLICATION-...

Kind Regards,
Peter Smith
Fujitsu Australia






view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Warn when creating or enabling a subscription with max_logical_replication_workers = 0
  In-Reply-To: <CAHut+Pt5KzE75ZyFZPC2fcb+GRes2DbHAh_vgfdDXoWmEV6hAg@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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