3

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.

asked May 23, 2018 at 18:46

1 Answer 1

4

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).

answered May 23, 2018 at 23:51
1
  • 5
    I use: ALTER SUBSCRIPTION <<sub_name>> disable; ALTER SUBSCRIPTION <<sub_name>> SET (slot_name = NONE); DROP SUBSCRIPTION <<sub_name>>; Commented Feb 6, 2020 at 10:58

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.