Created
October 25, 2022 10:10
-
-
Save dsouzajude/90ce7388d56831e2ce3260ca9b87bc3f to your computer and use it in GitHub Desktop.
Cleanup operation after PostgreSQL logical replication
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* These statements will perform the cleanup operation of a PostgreSQL logical replication | |
* Both the publisher and the subscriber databases need to be online for this to work. | |
*/ | |
-- These statements should run on the subscriber database | |
ALTER SUBSCRIPTION <SUBCRIPTION_NAME> DISABLE; | |
DROP SUBSCRIPTION <SUBCRIPTION_NAME>; | |
-- These statements should run on the publisher database | |
DROP PUBLICATION <PUBLICATION_NAME>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment