Re: No parameter values checking while creating Alter subscription...Connection

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: No parameter values checking while creating Alter subscription...Connection
Date: 2017-05-25 23:11:11
Message-ID: a00ca3ed-4fe8-d2d9-b362-29cbac83a0b5@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25/05/17 23:18, Andres Freund wrote:
> On 2017-05-25 17:08:57 -0400, Peter Eisentraut wrote:
>> On 5/25/17 10:18, Masahiko Sawada wrote:
>>>> postgres=# alter subscription c1 connection 'port=4000';
>>>> ALTER SUBSCRIPTION
>>>> postgres=# alter subscription c1 connection 'dbname=cc';
>>>> ALTER SUBSCRIPTION
>>>>
>>> CREATE SUBSCRIPTION tries to connect to publisher to create
>>> replication slot or to get table list for table synchronization, not
>>> to check the connection parameter value. So if you specify connect =
>>> false then CREATE SUBSCRIPTION doesn't try to connect.
>>
>> We don't make a connection attempt as part of ALTER SUBSCRIPTION. I
>> guess we could just connect and disconnect to check that it works.
>
> I think during reconfigurations it's quite useful to be able to do so
> even if the other hosts aren't reachable that second.
>

Yes, it's intended behavior for this very reason, we want ability to
(re)configure downstream without any existing upstream. It's also reason
why we have the WITH (connect = false) in CREATE SUBSCRIPTION. I don't
see a nice way how to do something similar (ie make it optional) for
ALTER though.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-05-25 23:16:13 Re: Create subscription with `create_slot=false` and incorrect slot name
Previous Message Peter Eisentraut 2017-05-25 21:26:15 Re: Create subscription with `create_slot=false` and incorrect slot name