Re: Identify missing publications from publisher while create/alter subscription.
От | Ashutosh Sharma |
---|---|
Тема | Re: Identify missing publications from publisher while create/alter subscription. |
Дата | |
Msg-id | CAE9k0PnusiP+sezFU+ggZrcPVv=7=f6X5k5NYtFe4-ddMMrmxA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Identify missing publications from publisher while create/alter subscription. (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: Identify missing publications from publisher while create/alter subscription.
|
Список | pgsql-hackers |
Just wondering if we should also be detecting the incorrect conninfo set with ALTER SUBSCRIPTION command as well. See below: -- try creating a subscription with incorrect conninfo. the command fails. postgres=# create subscription sub1 connection 'host=localhost port=5490 dbname=postgres' publication pub1; ERROR: could not connect to the publisher: connection to server at "localhost" (::1), port 5490 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5490 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? postgres=# postgres=# -- this time the conninfo is correct and the command succeeded. postgres=# create subscription sub1 connection 'host=localhost port=5432 dbname=postgres' publication pub1; NOTICE: created replication slot "sub1" on publisher CREATE SUBSCRIPTION postgres=# postgres=# -- reset the connninfo in the subscription to some wrong value. the command succeeds. postgres=# alter subscription sub1 connection 'host=localhost port=5490 dbname=postgres'; ALTER SUBSCRIPTION postgres=# postgres=# drop subscription sub1; ERROR: could not connect to publisher when attempting to drop replication slot "sub1": connection to server at "localhost" (::1), port 5490 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? connection to server at "localhost" (127.0.0.1), port 5490 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? HINT: Use ALTER SUBSCRIPTION ... SET (slot_name = NONE) to disassociate the subscription from the slot. == When creating a subscription we do connect to the publisher node hence the incorrect connection info gets detected. But that's not the case with alter subscription. -- With Regards, Ashutosh Sharma. On Sat, Nov 13, 2021 at 6:27 PM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > On Sat, Nov 13, 2021 at 12:50 PM vignesh C <vignesh21@gmail.com> wrote: > > > > Thanks for the comments, the attached v13 patch has the fixes for the same. > > Thanks for the updated v13 patch. I have no further comments, it looks > good to me. > > Regards, > Bharath Rupireddy. > >
В списке pgsql-hackers по дате отправления: