Warn when creating or enabling a subscription with max_logical_replication_workers = 0

From: Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>
To: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Warn when creating or enabling a subscription with max_logical_replication_workers = 0
Date: 2026-02-04 05:07:31
Message-ID: 20260204140731.0e4b511906ac748abad1f3d9@sraoss.co.jp
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

I've attached a patch to address this.

Regards,
Yugo Nagata

--
Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp>

Attachment Content-Type Size
0001-Warn-when-creating-or-enabling-a-subscription-with-l.patch text/x-diff 1.9 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-02-04 05:13:35 Re: refactor architecture-specific popcount code
Previous Message Soumya S Murali 2026-02-04 05:00:27 Re: Fix how some lists are displayed by psql \d+