BUG #15195: Creation two subscription with the same name in different databases

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: mariel(dot)cherkassky(at)gmail(dot)com
Subject: BUG #15195: Creation two subscription with the same name in different databases
Date: 2018-05-14 09:22:41
Message-ID: 152628976199.27212.11154683790404309602@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15195
Logged by: mariel cherkassky
Email address: mariel(dot)cherkassky(at)gmail(dot)com
PostgreSQL version: 10.4
Operating system: red hat 7
Description:

I tried to create a subscription in a database(database name : jsondb) that
has a different name from the database(database name : marieldb) in the
publisher. I succeeded. Then I created another database(jsondb) in the
subscriber server and in the new database (jsondb)I created a new
subscription with the same name of the previous subscription that I created
(in the database jsondb).
Summary :
publication server :
1 database : jsondb

subscriber server :
2 databases : jsondb,marieldb
in jsondb and in marieldb there are subscribers with the same name :

marieldb=# \dRs+
List of
subscriptions
Name | Owner | Enabled | Publication | Synchronous commit |
Conninfo

---------+----------+---------+-------------+--------------------+-------------------------------------------------------
-----------
my_sub1 | postgres | t | {pub1} | off |
dbname=jsondb host=my_ip user=rep password=rep
port=5432
(1 row)

marieldb=# \q
[pg2]$ psql -d jsondb;
psql (10.4)
Type "help" for help.

jsondb=# \dRs+
List of
subscriptions
Name | Owner | Enabled | Publication | Synchronous commit |
Conninfo

---------+----------+---------+-------------+--------------------+-------------------------------------------------------
-----------
my_sub1 | postgres | t | {my_pub} | off |
dbname=jsondb host=my_ip user=rep password=rep
port=5432
(1 row)

The problem is when I'm trying to delete one of them I cant because it is
seems that it is used :
jsondb=# \dRs+
List of
subscriptions
Name | Owner | Enabled | Publication | Synchronous commit |
Conninfo

---------+----------+---------+-------------+--------------------+-------------------------------------------------------
-----------
my_sub1 | postgres | f | {my_pub} | off |
dbname=jsondb host=172.22.13.121 user=rep password=rep
port=5432
(1 row)

jsondb=# drop subscription my_sub1;
stuck..

I tried to disable the subscriber in jsondb and drop the database but I'm
getting error :
postgres=# drop database jsondb;
ERROR: database "jsondb" is being used by logical replication
subscription
DETAIL: There is 1 subscription.

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2018-05-14 13:21:36 Re: Abnormal JSON query performance
Previous Message Ralf Jung 2018-05-14 09:15:44 "REVOKE ... ON DATABASE template1 ..." has no effect