DROP SUBSCRIPTION
DROP SUBSCRIPTION
7
SQL - Language Statements
DROP SUBSCRIPTION
remove a subscription
DROP SUBSCRIPTION [ IF EXISTS ] name [ DROP SLOT | NODROP SLOT ]
Description
DROP SUBSCRIPTION removes a subscription from the
database cluster.
A subscription can only be dropped by a superuser.
DROP SUBSCRIPTION cannot be executed inside a
transaction block when DROP SLOT is specified.
Parameters
name
The name of a subscription to be dropped.
DROP SLOT
NODROP SLOT
Specifies whether to drop the replication slot on the publisher. The
default is
DROP SLOT.
If the publisher is not reachable when the subscription is to be
dropped, then it is useful to specify NODROP SLOT.
But the replication slot on the publisher will then have to be removed
manually.
Examples
Drop a subscription:
DROP SUBSCRIPTION mysub;
Compatibility
DROP SUBSCRIPTION is a PostgreSQL>
extension.
See Also