From e12d99576dde7d0aeb59f755f1ed51f06008c6a7 Mon Sep 17 00:00:00 2001 From: Hayato Kuroda Date: Wed, 22 Mar 2023 10:14:22 +0000 Subject: [PATCH v3 1/2] Add XML ID attributes to create_subscription.sgml In commit ecb696, an XML ID attribute was added to only one varlistentry, creating inconsistency with the commit 78ee60. This commit adds XML ID attributes to all varlistentries in create_subscription.sgml for consistency. Additionally, links are added to refer to the subscription options, enhancing the readability of documents. --- doc/src/sgml/config.sgml | 4 +-- doc/src/sgml/logical-replication.sgml | 19 +++++++------ doc/src/sgml/ref/alter_subscription.sgml | 34 ++++++++++++----------- doc/src/sgml/ref/create_subscription.sgml | 30 ++++++++++---------- doc/src/sgml/ref/pg_dump.sgml | 6 ++-- 5 files changed, 48 insertions(+), 45 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 481f93cea1..a85bba0998 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -11722,8 +11722,8 @@ LOG: CleanUpLock: deleting: lock(0xb7acd844) id(24688,24696,0,0,0,1) On the publisher side, logical_replication_mode allows streaming or serializing changes immediately in logical decoding. When set to immediate, stream each change if the - streaming option (see optional parameters set by - CREATE SUBSCRIPTION) + streaming + option of CREATE SUBSCRIPTION is enabled, otherwise, serialize each change. When set to buffered, the decoding will stream or serialize changes when logical_decoding_work_mem is reached. diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 3836d13ad3..4aa643ce94 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -252,8 +252,8 @@ additional columns not provided by the published table. Any such columns will be filled with the default value as specified in the definition of the target table. However, logical replication in binary format is more - restrictive. See the binary - option of CREATE SUBSCRIPTION for details. + restrictive. See the binary + option of CREATE SUBSCRIPTION for details. @@ -587,7 +587,8 @@ ALTER SUBSCRIPTION Example 2: Where the subscription says connect = false, - but also specifies the slot_name + but also specifies the slot_name + option. @@ -704,9 +705,9 @@ ALTER SUBSCRIPTION If the row filter evaluates to false or NULL then the row is not replicated. The WHERE clause expression is evaluated with the same role used for the replication connection (i.e. - the role specified in the CONNECTION clause of the - ). Row filters have no effect for - TRUNCATE command. + the role specified in the CONNECTION + clause of the ). Row filters have + no effect for TRUNCATE command. @@ -1500,9 +1501,9 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER pg_replication_origin_advance() function. Before using this function, the subscription needs to be disabled temporarily either by ALTER SUBSCRIPTION ... DISABLE or, the - subscription can be used with the disable_on_error option. - Then, you can use pg_replication_origin_advance() function - with the node_name (i.e., pg_16395) + subscription can be used with the disable_on_error + option. Then, you can use pg_replication_origin_advance() + function with the node_name (i.e., pg_16395) and the next LSN of the finish LSN (i.e., 0/14C0379). The current position of origins can be seen in the pg_replication_origin_status system view. diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml index e92346edef..b7e6d2e83a 100644 --- a/doc/src/sgml/ref/alter_subscription.sgml +++ b/doc/src/sgml/ref/alter_subscription.sgml @@ -71,10 +71,10 @@ ALTER SUBSCRIPTION name RENAME TO < 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. @@ -175,12 +175,13 @@ ALTER SUBSCRIPTION name RENAME TO < 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. @@ -214,12 +215,13 @@ ALTER SUBSCRIPTION name RENAME TO < 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. @@ -233,8 +235,8 @@ ALTER SUBSCRIPTION name RENAME TO < 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) diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 9d4b9d4e33..a66b8025f3 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -61,7 +61,7 @@ CREATE SUBSCRIPTION subscription_nameParameters - + subscription_name @@ -70,7 +70,7 @@ CREATE SUBSCRIPTION subscription_name - + CONNECTION 'conninfo' @@ -81,7 +81,7 @@ CREATE SUBSCRIPTION subscription_name - + PUBLICATION publication_name [, ...] @@ -90,7 +90,7 @@ CREATE SUBSCRIPTION subscription_name - + WITH ( subscription_parameter [= value] [, ... ] ) @@ -102,7 +102,7 @@ CREATE SUBSCRIPTION subscription_name - + connect (boolean) @@ -129,7 +129,7 @@ CREATE SUBSCRIPTION subscription_name - + create_slot (boolean) @@ -145,7 +145,7 @@ CREATE SUBSCRIPTION subscription_name - + enabled (boolean) @@ -156,7 +156,7 @@ CREATE SUBSCRIPTION subscription_name - + slot_name (string) @@ -185,7 +185,7 @@ CREATE SUBSCRIPTION subscription_name - + binary (boolean) @@ -222,7 +222,7 @@ CREATE SUBSCRIPTION subscription_name - + copy_data (boolean) @@ -243,7 +243,7 @@ CREATE SUBSCRIPTION subscription_name - + streaming (enum) @@ -271,7 +271,7 @@ CREATE SUBSCRIPTION subscription_name - + synchronous_commit (enum) @@ -303,7 +303,7 @@ CREATE SUBSCRIPTION subscription_name - + two_phase (boolean) @@ -334,7 +334,7 @@ CREATE SUBSCRIPTION subscription_name - + disable_on_error (boolean) @@ -346,7 +346,7 @@ CREATE SUBSCRIPTION subscription_name - + origin (string) diff --git a/doc/src/sgml/ref/pg_dump.sgml b/doc/src/sgml/ref/pg_dump.sgml index d6b1faa804..77299878e0 100644 --- a/doc/src/sgml/ref/pg_dump.sgml +++ b/doc/src/sgml/ref/pg_dump.sgml @@ -1458,9 +1458,9 @@ CREATE DATABASE foo WITH TEMPLATE template0; 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 - two_phase option will be automatically enabled by the - subscriber if the subscription had been originally created with - two_phase = true option. + two_phase + option will be automatically enabled by the subscriber if the subscription + had been originally created with two_phase = true option. -- 2.27.0