Not getting error if ALTER SUBSCRIPTION syntax is wrong.

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Not getting error if ALTER SUBSCRIPTION syntax is wrong.
Date: 2017-05-05 12:40:43
Message-ID: 4c6d34e1-dc54-89eb-787e-4620f5fb56f9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-05-05 12:42:57 Re: password_encryption, default and 'plain' support
Previous Message Petr Jelinek 2017-05-05 12:40:20 Re: [patch] Build pgoutput with MSVC