+ option.
is evaluated with the same role used for the replication connection (i.e.
Before using this function, the subscription needs to be disabled temporarily
and the next LSN of the finish LSN (i.e., 0/14C0379). The current position of
- cause the same conflicts again so the finish LSN of the failed transaction will
- be written to the server log. For the usage of finish LSN, please refer to
+ When the
+ streaming
+ mode is parallel , the finish LSN of failed transactions
+ may not be logged. In that case, it may be necessary to change the streaming
+ mode to on or off and cause the same
+ conflicts again so the finish LSN of the failed transaction will be written
+ to the server log. For the usage of finish LSN, please refer to
linkend="sql-altersubscription">ALTER SUBSCRIPTION ...
SKIP.
subscription. A disabled subscription or a crashed subscription will have
zero rows in this view. If the initial data synchronization of any
table is in progress, there will be additional workers for the tables
- being synchronized. Moreover, if the streaming transaction is applied in
- parallel, there may be additional parallel apply workers.
+ being synchronized. Moreover, if the
+ streaming
+ transaction is applied in parallel, there may be additional parallel apply
+ workers.
executed inside a transaction block.
These commands also cannot be executed when the subscription has
- two_phase commit enabled,
- unless copy_data is false .
- See column subtwophasestate of
- pg_subscription
+ two_phase
+ commit enabled, unless
+ copy_data
+ is false . See column subtwophasestate
+ of pg_subscription
to know the actual two-phase state.
See for details of
how copy_data = true can interact with the
- origin parameter.
+ origin
+ parameter.
- See the binary
- option of CREATE SUBSCRIPTION for details
- about copying pre-existing data in binary format.
+ See the
+ binary
+ parameter of CREATE SUBSCRIPTION for details about
+ copying pre-existing data in binary format.
This clause alters parameters originally set by
. See there for more
- information. The parameters that can be altered
- are slot_name ,
- synchronous_commit ,
- binary , streaming ,
- disable_on_error , and
- origin .
+ information. The parameters that can be altered are
+ slot_name ,
+ synchronous_commit ,
+ binary ,
+ streaming ,
+ disable_on_error ,
+ and origin .
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 on
- subscriber.
+ already prepared by enabling
+ 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 )
Parameters
-
+ id="sql-createsubscription-name">
subscription_name
-
+ id="sql-createsubscription-connection">
CONNECTION 'conninfo '
-
+ id="sql-createsubscription-publication">
PUBLICATION publication_name [, ...]
-
+ id="sql-createsubscription-with">
WITH ( subscription_parameter [= value ] [, ... ] )
-
+ id="sql-createsubscription-with-connect">
connect (boolean )
-
+ id="sql-createsubscription-with-create-slot">
create_slot (boolean )
-
+ id="sql-createsubscription-with-enabled">
enabled (boolean )
-
+ id="sql-createsubscription-with-slot-name">
slot_name (string )
- binary" xreflabel="binary">
+ with-binary">
binary (boolean )
-
+ id="sql-createsubscription-with-copy-data">
copy_data (boolean )
-
+ id="sql-createsubscription-with-streaming">
streaming (enum )
-
+ id="sql-createsubscription-with-synchronous-commit">
synchronous_commit (enum )
-
+ id="sql-createsubscription-with-two-phase">
two_phase (boolean )
-
+ id="sql-createsubscription-with-disable-on-error">
disable_on_error (boolean )
-
+ id="sql-createsubscription-with-origin">
origin (string )
truncate the target tables before initiating a new full table copy. If users
intend to copy initial data during refresh they must create the slot with
two_phase = false . After the initial sync, the
-
teral>two_phase option will be automatically enabled by the
- subscriber if the subscription had been originally created with
- two_phase = true option.
+
nk linkend="sql-createsubscription-with-two-phase">two_phase
+ option will be automatically enabled by the subscriber if the subscription
+ had been originally created with two_phase = true option.