Re: Not getting error if ALTER SUBSCRIPTION syntax is wrong.

From: Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Not getting error if ALTER SUBSCRIPTION syntax is wrong.
Date: 2017-05-06 12:44:27
Message-ID: 40492115-d7ed-eec2-67e8-4d5bd8185beb@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/05/17 19:51, Petr Jelinek wrote:
> On 05/05/17 14:40, tushar wrote:
>> Hi,
>>
>> While testing 'logical replication' against v10 , i encountered one
>> issue where data stop migrating after ALTER PUBLICATION.
>>
>> X Server
>> \\ Make sure wal_level is set to logical in postgresql.conf file
>> \\create table/Insert 1 row -> create table test(n int); insert into t
>> values (1);
>> \\create publication for all -> create publication pub for ALL TABLES ;
>>
>>
>> Y server
>>
>> \\ Make sure wal_level is set to logical in postgresql.conf file
>> \\create table -> create table test(n int);
>>
>> \\create Subscription
>>
>> CREATE SUBSCRIPTION sub CONNECTION 'host=localhost dbname=postgres
>> port=5432 ' PUBLICATION pub;
>>
>> [...]
>>
>> I think probably syntax of alter subscription is not correct but
>> surprisingly it is not throwing an error.
>>
>
> Syntax of ALTER command is correct, syntax of the connection string is
> not, you are probably getting errors in log from the replication worker.
>
> We could check validity of the connection string though to complain
> immediately like we do in CREATE.
>

The attached does exactly that.

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

Attachment Content-Type Size
Check-connection-info-in-ALTER-SUBSCRIPTION.patch binary/octet-stream 2.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-05-06 12:56:17 Re: Draft release notes for next week's back-branch releases
Previous Message Amit Kapila 2017-05-06 12:02:10 Re: [PROPOSAL] Use SnapshotAny in get_actual_variable_range