From fee1040fe330bd17054fc7e4296e9cde203ede0f Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Mon, 13 Sep 2021 08:29:10 +0530 Subject: [PATCH] Doc: Change optional parameters grouping in Create Subscription. The subscription parameters are rearranged into two groups: a) those that control what happens during Create Subscription b) those that control the replication behavior This makes the documentation of Create Subscription easier to follow. Author: Peter Smith Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CAHut+PtPJDSOxtuMGpO2yDrRPKxcYGL4n7HqJP9HernZE=Cj+g@mail.gmail.com --- doc/src/sgml/ref/create_subscription.sgml | 150 ++++++++++++---------- 1 file changed, 82 insertions(+), 68 deletions(-) diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index 702934eba1..04a0fd7fba 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -92,17 +92,39 @@ CREATE SUBSCRIPTION subscription_nameWITH ( 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. @@ -146,6 +168,57 @@ CREATE SUBSCRIPTION subscription_name + + + + + The following parameters control the replication behavior: + + + + + binary (boolean) + + + Specifies whether the subscription will request the publisher to + send the data in binary format (as opposed to text). + The default is false. + Even when this option is enabled, only data types that have + binary send and receive functions will be transferred in binary. + + + + When doing cross-version replication, it could happen that the + publisher has a binary send function for some data type, but the + subscriber lacks a binary receive function for the type. In + such a case, data transfer will fail, and + the binary option cannot be used. + + + + + + copy_data (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. + + + + + + streaming (boolean) + + + Specifies whether streaming of in-progress transactions should + be enabled for this subscription. By default, all transactions + are fully decoded on the publisher, and only then sent to the + subscriber as a whole. + + + synchronous_commit (enum) @@ -179,67 +252,6 @@ CREATE SUBSCRIPTION subscription_name - - binary (boolean) - - - Specifies whether the subscription will request the publisher to - send the data in binary format (as opposed to text). - The default is false. - Even when this option is enabled, only data types that have - binary send and receive functions will be transferred in binary. - - - - When doing cross-version replication, it could happen that the - publisher has a binary send function for some data type, but the - subscriber lacks a binary receive function for the type. In - such a case, data transfer will fail, and - the binary option cannot be used. - - - - - - connect (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. - - - - - streaming (boolean) - - - Specifies whether streaming of in-progress transactions should - be enabled for this subscription. By default, all transactions - are fully decoded on the publisher, and only then sent to the - subscriber as a whole. - - - - two_phase (boolean) @@ -266,7 +278,9 @@ CREATE SUBSCRIPTION subscription_name - + + +