'nocopy data' option is set in SUBSCRIPTION but still data is getting migrated

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: 'nocopy data' option is set in SUBSCRIPTION but still data is getting migrated
Date: 2017-05-10 13:27:03
Message-ID: 75b35b5c-138d-ecb5-9786-eaa3e48ed92a@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Please refer this scenario -where 'nocopy data' option is set in
SUBSCRIPTION but still data is getting migrated

Publication - (X)
create table t(n int);
insert into t values (generate_series(1,99));
create publication pub for table t;

Subscription (Y)
create table t(n int);
CREATE SUBSCRIPTION sub CONNECTION 'dbname=postgres host=localhost
port=5000 user=centos password=a' PUBLICATION pub WITH (copy
data,SYNCHRONOUS_COMMIT=on);
select count(*) from t; ->showing 99 rows
alter subscription sub refresh publication with (nocopy data);
restart the server (Y)

X - insert more records into table 't'
Y - check the row count , rows have been migrated from X .

Is it the right behavior in this case where nocopy data option is set ?

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2017-05-10 13:52:14 Re: Concurrent ALTER SEQUENCE RESTART Regression
Previous Message Michael Paquier 2017-05-10 13:22:28 Re: Removal of plaintext password type references