postgresql_16:7.1.31.2 Parameters
PostgreSQL 16 > Reference > SQL Commands > ALTER SUBSCRIPTION > Parameters
*name*
The name of a subscription whose properties are to be altered.
**CONNECTION '*conninfo*'**
This clause replaces the connection string originally set by (see postgresql_16:7.1.82). See there for more information.
**SET PUBLICATION *publication_name*, ADD PUBLICATION *publication_name*, DROP PUBLICATION *publication_name***
These forms change the list of subscribed publications. SET replaces the entire list of publications with a new list, ADD adds additional publications to the list of publications, and DROP removes the publications from the list of publications. We allow non-existent publications to be specified in ADD and SET variants so that users can add those later. See (see postgresql_16:7.1.82) for more information. By default, this command will also act like REFRESH PUBLICATION.
*publication_option* specifies additional options for this operation. The supported options are: refresh (boolean) When false, the command will not try to refresh table information. REFRESH PUBLICATION should then be executed separately. The default is true. Additionally, the options described under REFRESH PUBLICATION may be specified, to control the implicit refresh operation.
REFRESH PUBLICATION
Fetch missing table information from publisher. This will start replication of tables that were added to the subscribed-to publications since CREATE SUBSCRIPTION or the last invocation of REFRESH PUBLICATION.
*refresh_option* specifies additional options for the refresh operation. The supported options are: copy_data (boolean) Specifies whether to copy pre-existing data in the publications that are being subscribed to when the replication starts. The default is true. Previously subscribed tables are not copied, even if a table's row filter WHERE clause has since been modified. See (see postgresql_16:7.1.82.3) for details of how copy_data = true can interact with the origin (see sql-createsubscription-with-origin) parameter. See the binary (see sql-createsubscription-with-binary) parameter of CREATE SUBSCRIPTION for details about copying pre-existing data in binary format.
ENABLE
Enables a previously disabled subscription, starting the logical replication worker at the end of the transaction.
DISABLE
Disables a running subscription, stopping the logical replication worker at the end of the transaction.
**SET ( *subscription_parameter* [= *value*] [, ... ] )**
This clause alters parameters originally set by (see postgresql_16:7.1.82). See there for more information. The parameters that can be altered are slot_name (see sql-createsubscription-with-slot-name), synchronous_commit (see sql-createsubscription-with-synchronous-commit), binary (see sql-createsubscription-with-binary), streaming (see sql-createsubscription-with-streaming), disable_on_error (see sql-createsubscription-with-disable-on-error), password_required (see sql-createsubscription-with-password-required), run_as_owner (see sql-createsubscription-with-run-as-owner), and origin (see sql-createsubscription-with-origin). Only a superuser can set password_required = false.
**SKIP ( *skip_option* = *value* )**
Skips applying all changes of the remote transaction. If incoming data violates any constraints, logical replication will stop until it is resolved. By using the ALTER SUBSCRIPTION ... SKIP command, the logical replication worker skips all data modification changes within the transaction. This option has no effect on the transactions that are already prepared by enabling two_phase (see sql-createsubscription-with-two-phase) on the subscriber. After the logical replication worker successfully skips the transaction or finishes a transaction, the LSN (stored in pg_subscription.subskiplsn) is cleared. See (see postgresql_16:4.16.5) for the details of logical replication conflicts.
*skip_option* specifies options for this operation. The supported option is: lsn (pg_lsn) Specifies the finish LSN of the remote transaction whose changes are to be skipped by the logical replication worker. The finish LSN is the LSN at which the transaction is either committed or prepared. Skipping individual subtransactions is not supported. Setting NONE resets the LSN.
*new_owner*
The user name of the new owner of the subscription.
*new_name*
The new name for the subscription.
When specifying a parameter of type boolean, the = *value* part can be omitted, which is equivalent to specifying TRUE.