From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Getting error at the time of dropping subscription and few more issues |
Date: | 2017-05-12 12:35:24 |
Message-ID: | 4b387d6e-e650-a769-6c0c-77d52a926581@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
There are few more issues , found in logical replication
(1)ERROR: tuple concurrently updated
Publication Server - (X machine)
\\create table \ create publication \ insert rows
create table t(n int);
create publication pub for table t;
insert into t values (generate_series(1,1000000));
Subscription Server-(Y machine)
\\create table t / create subscription
create table t(n int);
create subscription sub connection 'dbname=postgres port=5000
user=centos password=a' publication pub;
\\drop subscription and re-create (repeat this 2-3 times)
postgres=# drop subscription sub;
NOTICE: dropped replication slot "sub" on publisher
DROP SUBSCRIPTION
postgres=# create subscription sub connection 'dbname=postgres port=5000
user=centos password=a' publication pub;
NOTICE: synchronized table states
NOTICE: created replication slot "sub" on publisher
CREATE SUBSCRIPTION
postgres=# select count(*) from t;
count
---------
1000000
(1 row)
postgres=# drop subscription sub;
ERROR: tuple concurrently updated
(2) Not able to drop the subscription even 'nocreate slot' is specified
postgres=# create subscription s2s1 connection 'dbname=postgres
port=5000 user=t password=a' publication t with (nocreate
slot,enabled,copydata,SYNCHRONOUS_COMMIT='on');
NOTICE: synchronized table states
CREATE SUBSCRIPTION
--not able to drop subscription , i have checked on Publication - no
such slot created but still it is looking for slot.
postgres=# drop subscription s2s1;
ERROR: could not drop the replication slot "s2s1" on publisher
DETAIL: The error was: ERROR: replication slot "s2s1" does not exist
(3)Alter publication SET command doesn't give you NOTICE message about
tables which got removed.
postgres=# create publication pub for table t,t1,t2 ;
CREATE PUBLICATION
postgres=# select * from pg_publication_tables ;
pubname | schemaname | tablename
---------+------------+-----------
pub | public | t
pub | public | t1
pub | public | t2
(3 rows)
postgres=# alter publication pub set table t;
ALTER PUBLICATION
postgres=# select * from pg_publication_tables ;
pubname | schemaname | tablename
---------+------------+-----------
pub | public | t
(1 row)
in subscription - (we are getting NOTICE message, about tables which
got removed)
postgres=# alter subscription sub set publication pub refresh;
NOTICE: removed subscription for table public.t1
NOTICE: removed subscription for table public.t2
ALTER SUBSCRIPTION
I think - in publication too ,we should provide NOTICE messages.
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
https://sites.google.com/a/enterprisedb.com/old-new-touplestores/
From | Date | Subject | |
---|---|---|---|
Next Message | amul sul | 2017-05-12 12:38:36 | Re: [POC] hash partitioning |
Previous Message | Andrew Dunstan | 2017-05-12 12:05:14 | Re: PROVE_FLAGS |