From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
---|---|
To: | Peter Smith <smithpb2250(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: create subscription - improved warning message |
Date: | 2022-10-10 04:27:22 |
Message-ID: | CAA4eK1+z_=25DqsLfdP3e4KtrMAOd9yG7BVSv5W7iXu-RcAthA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Oct 10, 2022 at 4:40 AM Peter Smith <smithpb2250(at)gmail(dot)com> wrote:
>
> But if it's OK to do that then:
> - maybe it should mention the connection since the connect=false was
> what caused this warning.
> - maybe saying 'replication' instead of 'collection of data' would be
> more consistent with the pgdocs for CREATE SUBSCRIPTION
>
> e.g.
>
> WARNING: subscription was created, but is not connected
> HINT: You should run %s to initiate replication.
>
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
Then, I enabled the subscription and again tried as below:
postgres=# Alter subscription sub1 enable;
ALTER SUBSCRIPTION
postgres=# Alter subscription sub1 refresh publication;
ALTER SUBSCRIPTION
Even after the above replication is not initiated. I see "ERROR:
replication slot "sub1" does not exist" in subscriber logs. Then, I
manually created this slot (by using
pg_create_logical_replication_slot) on the publisher. After that,
replication started to work.
If I am not missing something, don't you think we need a somewhat more
elaborative HINT, or may be just give the WARNING?
--
With Regards,
Amit Kapila.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-10-10 04:40:55 | Re: create subscription - improved warning message |
Previous Message | Bharath Rupireddy | 2022-10-10 03:27:31 | Re: ps command does not show walsender's connected db |