Re: create subscription - improved warning message - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: create subscription - improved warning message
Date
Msg-id CAA4eK1LfR0EFqBehu=1tiCzb9uhQC=zuOsdYiZjTTZPiKjRvvQ@mail.gmail.com
Whole thread Raw
In response to Re: create subscription - improved warning message  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: create subscription - improved warning message
List pgsql-hackers
On Mon, Oct 10, 2022 at 10:10 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Amit Kapila <amit.kapila16@gmail.com> writes:
> > Yeah, this message looks better than the current one. However, when I
> > tried to do what HINT says, it doesn't initiate replication. It gives
> > me the below error:
>
> > postgres=# Alter subscription sub1 refresh publication;
> > ERROR:  ALTER SUBSCRIPTION ... REFRESH is not allowed for disabled subscriptions
>
> Geez ... is there *anything* that's not broken about this message?
>
> I'm beginning to question the entire premise here.  That is,
> rather than tweaking this message until it's within hailing
> distance of sanity, why do we allow the no-connect case at all?
>

The docs say [1]: "When creating a subscription, the remote host is
not reachable or in an unclear state. In that case, the subscription
can be created using the connect = false option. The remote host will
then not be contacted at all. This is what pg_dump uses. The remote
replication slot will then have to be created manually before the
subscription can be activated."

I think the below gives accurate information:
WARNING: subscription was created, but is not connected
HINT: You should create the slot manually, enable the subscription,
and run %s to initiate replication.

[1] - https://www.postgresql.org/docs/devel/logical-replication-subscription.html

-- 
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: create subscription - improved warning message
Next
From: John Naylor
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum