WITH ( subscription_parameter [= value] [, ... ] )
- This clause specifies optional parameters for a subscription. The
- following parameters are supported:
+ This clause specifies optional parameters for a subscription.
+
+
+ The following parameters control what happens during subscription creation:
+
- copy_data (boolean)
+ connect (boolean)
- Specifies whether the existing data in the publications that are
- being subscribed to should be copied once the replication starts.
- The default is true.
+ Specifies whether the CREATE 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.
+
+
+ Since no connection is made when this option is set
+ to false, the tables are not subscribed, and so
+ after you enable the subscription nothing will be replicated.
+ It is required to run
+ ALTER SUBSCRIPTION ... REFRESH PUBLICATION in order
+ for tables to be subscribed.
+
+
-
- synchronous_commit (enum)
-
- The value of this parameter overrides the
- setting within this
- subscription's apply worker processes. The default value
- is off.
-
-
- It is safe to use off for logical replication:
- If the subscriber loses transactions because of missing
- synchronization, the data will be sent again from the publisher.
-
+ The following parameters control the replication behavior:
- A different setting might be appropriate when doing synchronous
- logical replication. The logical replication workers report the
- positions of writes and flushes to the publisher, and when using
- synchronous replication, the publisher will wait for the actual
- flush. This means that setting
- synchronous_commit for the subscriber to
- off when the subscription is used for
- synchronous replication might increase the latency for
- COMMIT on the publisher. In this scenario, it
- can be advantageous to set synchronous_commit
- to local or higher.
-
-
-
+
binary (boolean)
- connect (boolean)
+ copy_data (boolean)
- Specifies whether the CREATE 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.
-
-
- Since no connection is made when this option is set
- to false, the tables are not subscribed, and so
- after you enable the subscription nothing will be replicated.
- It is required to run
- ALTER SUBSCRIPTION ... REFRESH PUBLICATION in order
- for tables to be subscribed.
+ Specifies whether the existing data in the publications that are
+ being subscribed to should be copied once the replication starts.
+ The default is true.
+
streaming (boolean)
are fully decoded on the publisher, and only then sent to the
subscriber as a whole.
+
+
+
+
+ synchronous_commit (enum)
+
+ The value of this parameter overrides the
+ setting within this
+ subscription's apply worker processes. The default value
+ is off.
+
+
+ It is safe to use off for logical replication:
+ If the subscriber loses transactions because of missing
+ synchronization, the data will be sent again from the publisher.
+
+ A different setting might be appropriate when doing synchronous
+ logical replication. The logical replication workers report the
+ positions of writes and flushes to the publisher, and when using
+ synchronous replication, the publisher will wait for the actual
+ flush. This means that setting
+ synchronous_commit for the subscriber to
+ off when the subscription is used for
+ synchronous replication might increase the latency for
+ COMMIT on the publisher. In this scenario, it
+ can be advantageous to set synchronous_commit
+ to local or higher.
+
+
two_phase (boolean)
-
+
+
+