From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | ALTER SUBSCRIPTION ..SET PUBLICATION <no name> refresh is not throwing error. |
Date: | 2017-05-23 09:00:41 |
Message-ID: | 7ac3d374-2217-973d-1af7-ee11fd65eadc@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
ALTER SUBSCRIPTION ..SET PUBLICATION <no name> refresh is removing all
the attached subscription('s).
X Machine -
s=# create table t(n int);
CREATE TABLE
s=# create table t1(n int);
CREATE TABLE
s=# create publication pub for table t,t1;
CREATE PUBLICATION
s=#
Y Machine -
s=# create table t(n int);
CREATE TABLE
s=# create table t1(n int);
CREATE TABLE
s=# create subscription s1 connection 'dbname=s port=5432 user=centos
host=localhost' publication pub;
NOTICE: synchronized table states
NOTICE: created replication slot "s1" on publisher
CREATE SUBSCRIPTION
s=# alter subscription s1 set publication skip refresh ;
NOTICE: removed subscription for table public.t
NOTICE: removed subscription for table public.t1
ALTER SUBSCRIPTION
s=#
I think - this is probably due to not given publication NAME in the sql
query .
we are doing a syntax check at the time of REFRESH but not with SKIP
REFRESH
s=# alter subscription s1 set publication refresh ;
ERROR: syntax error at or near ";"
LINE 1: alter subscription s1 set publication refresh ;
^
s=# alter subscription s1 set publication skip refresh ;
ALTER SUBSCRIPTION
s=#
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Borodin | 2017-05-23 09:53:56 | Index Only Scan support for cube |
Previous Message | Dmitry Dolgov | 2017-05-23 08:43:45 | Re: Create subscription with `create_slot=false` and incorrect slot name |