Cannot drop an azure postgres database with logical subscription
Hi there,
I've been playing with logical replication with a postgres database in Azure. I created two database (main
and replica
) on the same postgres service and then I created a publication on the main
database and a subscription on the replica
. Unfortunately, I wasn't able to make the replication works (that's another problem ^^). Then, I removed, using the Azure panel, both databases. The main
database has been dropped successfully. However, the replica
failed. I tried to drop the database using a SQL client (dbeaver) afterwards and I see the problem is that there is an active subscription.
The problem is that I cannot drop that subscription. With drop subscription sub1
I get the error that sub1 does not exist
(but is listed when I run select * from pg_subscription;
). After a bit of google research, I saw that I have to connect to the replica
database in order to remove the subscription but... I cannot connect to the replica
database (the error is is not currently accepting connections
). Looks like the replica
database is in an unstable state as I see it in some places (like Azure panel or when I select *
from
pg_stat_database`
) but in other places is hidden (like en Dbeaver navigation list).
I'm not sure how to fix this problem. Can someone help me?
Thanks.