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

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: No parameter values checking while creating Alter subscription...Connection
Date: 2017-05-25 14:18:21
Message-ID: CAD21AoDp6=A0RLUMBviwKA8ZrE=OdOAFFEbW5N+w=Cq1GLu=bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 25, 2017 at 9:43 AM, tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> wrote:
> Hi,
>
> We usually check connection parameter values while creating create
> subscription
>
> \\port is WRONG
>
> postgres=# create subscription c1 connection 'port=4000 ' publication pub;
> ERROR: could not connect to the publisher: could not connect to server: No
> such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.4000"?
> postgres=#
>
> \\when database doesn't exist
>
> postgres=# create subscription c1 connection 'dbname=postgre ' publication
> pub;
> ERROR: could not connect to the publisher: FATAL: database "postgre" does
> not exist
> postgres=#
>
> but such checking is not done at the time of alter subscription ..
> connection
>
> 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.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-05-25 14:31:40 Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)
Previous Message Amit Kapila 2017-05-25 14:00:58 Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)