DROP SUBSCRIPTION

A DDL command for removing a logical subscription

DROP SUBSCRIPTION is a DDL command for removing a logical subscription.

DROP SUBSCRIPTION was added in PostgreSQL 10.

Change history

DROP SUBSCRIPTION has not been modified since it was added in PostgreSQL 10.

Examples

Basic execution of DROP SUBSCRIPTION:

postgres=# DROP SUBSCRIPTION test_subscription;
NOTICE:  dropped replication slot "test_subscription" on publisher
DROP SUBSCRIPTION

Attempting to drop a non-existent subscription:

postgres=# DROP SUBSCRIPTION other_subscription;
ERROR:  subscription "other_subscription2" does not exist

Categories

DDL, Logical replication, SQL command

See also

CREATE SUBSCRIPTION, ALTER SUBSCRIPTION