Warn when creating or enabling a subscription with max_logical_replication_workers = 0
Yugo Nagata <nagata@sraoss.co.jp>
From: Yugo Nagata <nagata@sraoss.co.jp>
To: Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2026-02-04T05:07:31Z
Lists: pgsql-hackers
Attachments
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@sraoss.co.jp>