Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax iswrong.

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax iswrong.
Дата
Msg-id 94c1607e-43e4-4ce4-23a5-cfff3c36d2f9@2ndquadrant.com
обсуждение исходный текст
Ответ на [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.  (tushar <tushar.ahuja@enterprisedb.com>)
Ответы Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.  (Robert Haas <robertmhaas@gmail.com>)
Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax iswrong.  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Список pgsql-hackers
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;
> 
> postgres=# select * from test;
>  n
> ---
>  1
> (1 row)
> 
> \\Alter subscription
> postgres=# alter subscription sub connection 'host=localhost
> dbname=postgres PUBLICATION pub';
> ALTER SUBSCRIPTION
> 
> X server
> postgres=# insert into test values (1);
> INSERT 0 1
> postgres=# select * from test;
>  n
> ---
>  1
>  1
> (2 rows)
> 
> Y server
> postgres=# select * from test;
>  n
> ---
>  1
> (1 row)
> 
> 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.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] snapbuild woes
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Not getting error if ALTER SUBSCRIPTION syntax is wrong.