HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

Cannot drop database with logical replication

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
cannotwithreplicationdatabasedroplogical

Problem

I cannot drop database having logical replication SUBSCRIPTION, when i try to dropdb i get an error saying that the database contains a subscription but when i try to drop the SUBSCRIPTION i get an error saying the replication slot does not exist.

Solution

Check out the fine documentation:


If this fails, either because the remote host is not reachable or because the remote replication slot cannot be dropped or does not exist or never existed, the DROP SUBSCRIPTION command will fail. To proceed in this situation, disassociate the subscription from the replication slot by executing ALTER SUBSCRIPTION ... SET (slot_name = NONE).

Context

StackExchange Database Administrators Q#207653, answer score: 4

Revisions (0)

No revisions yet.