Skip to content

Subscription

The subscription represents a replication connection to the publisher.

Properties

Property Type Required Description
name string yes The name of the subscription to create.
connection string yes The connection string to the publisher.
publications array of string yes Publications to subscribe to on the publisher. Minimum items: 1.
parameters object — Subscription Parameters.
comment string — An optional comment about the publication.
security_labels security_labels — Security Labels.

parameters

Property Type Required Description
copy_data boolean — Specifies whether the existing data in the publications that are being subscribed to should be copied once the replication starts. Default: true.
create_slot boolean — Specifies whether the command should create the replication slot on the publisher. Default: true.
enabled boolean — Specifies whether the subscription should be actively replicating, or whether it should be just setup but not started yet. Default: true.
slot_name string — Name of the replication slot to use. The default behavior is to use the name of the subscription for the slot name. When slot_name is set to NONE, there will be no replication slot associated with the subscription. This can be used if the replication slot will be created later manually. Such subscriptions must also have both enabled and create_slot set to false.
synchronous_commit True | remote_apply | remote_write | local | False — The value of this parameter overrides the synchronous_commit setting. Default: false.
binary boolean — Specifies whether the subscription requests the publisher to send the data in binary format. Default: false.
streaming boolean | on | off | parallel — Specifies whether to enable streaming of in-progress transactions. Default: "parallel".
two_phase boolean — Specifies whether two-phase commit is enabled for this subscription. Default: false.
disable_on_error boolean — Specifies whether the subscription is disabled automatically when an error occurs on the subscriber. Default: false.
password_required boolean — Specifies whether the connection to the publisher must use a password. Default: true.
run_as_owner boolean — Specifies whether replication runs as the subscription owner, and not as the owner of each table. Default: false.
failover boolean — Specifies whether the replication slot is synchronized to the standby servers of the publisher. Default: false.
origin any | none — Specifies whether to request only the changes that have no origin (none), or all changes (any). Default: "any".
connect boolean — Specifies whether the subscription should connect to the publisher at all. Setting this to false will change default values of enabled, create_slot and copy_data to false. It is not allowed to combine connect set to false and enabled, create_slot, or copy_data set to true. Default: true.

No other properties are accepted.


Source: schemata/subscription.yml · Resolved JSON Schema: subscription.json