Warn when creating or enabling a subscription with max_logical_replication_workers = 0 - Mailing list pgsql-hackers

From Yugo Nagata
Subject Warn when creating or enabling a subscription with max_logical_replication_workers = 0
Date
Msg-id 20260204140731.0e4b511906ac748abad1f3d9@sraoss.co.jp
Whole thread Raw
Responses Re: Warn when creating or enabling a subscription with max_logical_replication_workers = 0
List 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@sraoss.co.jp>

Attachment

pgsql-hackers by date:

Previous
From: Soumya S Murali
Date:
Subject: Re: Fix how some lists are displayed by psql \d+
Next
From: John Naylor
Date:
Subject: Re: refactor architecture-specific popcount code