Doc: Change optional parameters grouping in Create Subscription.
authorAmit Kapila
Mon, 13 Sep 2021 02:59:10 +0000 (08:29 +0530)
committerAmit Kapila
Mon, 13 Sep 2021 02:59:10 +0000 (08:29 +0530)
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

index 702934eba13ccacca1308134d305e8cc56f020d8..04a0fd7fba37e5723ed6f438a6a2b05602d66c59 100644 (file)
@@ -92,17 +92,39 @@ CREATE SUBSCRIPTION subscription_name
     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
+          enabledcreate_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,38 +168,13 @@ CREATE SUBSCRIPTION subscription_name
          
         
        
+      
+     
 
-       
-        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)
@@ -201,33 +198,16 @@ CREATE SUBSCRIPTION subscription_name
        
 
        
-        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
-          enabledcreate_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)
         
@@ -237,9 +217,41 @@ CREATE SUBSCRIPTION subscription_name
           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)
         
@@ -266,7 +278,9 @@ CREATE SUBSCRIPTION subscription_name
 
         
        
-      
+      
+     
+