ALTER SUBSCRIPTION
ALTER SUBSCRIPTION
7
SQL - Language Statements
ALTER SUBSCRIPTION
change the definition of a subscription
ALTER SUBSCRIPTION name WITH ( option [, ... ] ) ]
where option can be:
SLOT NAME = slot_name
ALTER SUBSCRIPTION name OWNER TO { new_owner | CURRENT_USER | SESSION_USER }
ALTER SUBSCRIPTION name CONNECTION 'conninfo'
ALTER SUBSCRIPTION name SET PUBLICATION publication_name [, ...]
ALTER SUBSCRIPTION name ENABLE
ALTER SUBSCRIPTION name DISABLE
Description
ALTER SUBSCRIPTION can change most of the subscription
properties that can be specified
in .
To alter the owner, you must also be a direct or indirect member of the
new owning role. The new owner has to be a superuser
Parameters
name
The name of a subscription whose properties are to be altered.
CONNECTION 'conninfo'
SET PUBLICATION publication_name
SLOT NAME = slot_name
These clauses alter properties originally set by
. See there for more
information.
ENABLE
Enables the previously disabled subscription, starting the logical
replication worker at the end of transaction.
DISABLE
Disables the running subscription, stopping the logical replication
worker at the end of transaction.
Examples
Change the publication subscribed by a subscription to
insert_only:
ALTER SUBSCRIPTION mysub SET PUBLICATION insert_only;
Disable (stop) the subscription:
ALTER SUBSCRIPTION mysub DISABLE;
Compatibility
ALTER SUBSCRIPTION is a PostgreSQL>
extension.
See Also