Re: create subscription - improved warning message
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Peter Smith <smithpb2250@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-10-10T04:27:22Z
Lists: pgsql-hackers
On Mon, Oct 10, 2022 at 4:40 AM Peter Smith <smithpb2250@gmail.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.
Commits
-
Doc: Update information about manually creating slots.
- 155601de7fdb 16.0 landed
-
Improve the WARNING message for CREATE SUBSCRIPTION.
- 5263c6b095c9 16.0 landed