Doc: Add more links in logical replication pages.
authorAmit Kapila
Fri, 13 Oct 2023 06:43:46 +0000 (12:13 +0530)
committerAmit Kapila
Fri, 13 Oct 2023 06:43:46 +0000 (12:13 +0530)
The logical replication pages in the docs mostly have links to
corresponding pub/sub commands whenever they are mentioned, but there were
some omissions. This patch adds the missing links.

Author: Peter Smith
Reviewed-by: Vignesh C, Amit Kapila
Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPu2S4RdzYKR7H5_E7QYWyq5hB0hL4EFrYbP91Qso62jeg%40mail.gmail.com

doc/src/sgml/logical-replication.sgml
doc/src/sgml/ref/alter_publication.sgml
doc/src/sgml/ref/alter_subscription.sgml
doc/src/sgml/ref/drop_subscription.sgml

index 3b2fa1129e281f8b00c383b03181fd4a6da93faf..8c3837e89bdcc5073ce641e6f8df579a0f2e2f6c 100644 (file)
    
    
     Normally, the remote replication slot is created automatically when the
-    subscription is created using CREATE SUBSCRIPTION and it
+    subscription is created using 
+    CREATE SUBSCRIPTION and it
     is dropped automatically when the subscription is dropped using
-    DROP SUBSCRIPTION.  In some situations, however, it can
+    DROP SUBSCRIPTION.
+    In some situations, however, it can
     be useful or necessary to manipulate the subscription and the underlying
     replication slot separately.  Here are some scenarios:
 
        When dropping a subscription, the replication slot should be kept.
        This could be useful when the subscriber database is being moved to a
        different host and will be activated from there.  In that case,
-       disassociate the slot from the subscription using ALTER
-       SUBSCRIPTION before attempting to drop the subscription.
+       disassociate the slot from the subscription using
+       ALTER SUBSCRIPTION
+       before attempting to drop the subscription.
       
      
 
@@ -1349,7 +1352,8 @@ test_sub=# SELECT * FROM child ORDER BY a;
      If a subscription is affected by this problem, the only way to resume
      replication is to adjust one of the column lists on the publication
      side so that they all match; and then either recreate the subscription,
-     or use ALTER SUBSCRIPTION ... DROP PUBLICATION to
+     or use 
+     ALTER SUBSCRIPTION ... DROP PUBLICATION to
      remove one of the offending publications and add it again.
     
    
@@ -1504,13 +1508,15 @@ CONTEXT:  processing remote data for replication origin "pg_16395" during "INSER
    the replication origin name can be found from the server log (LSN 0/14C0378 and
    replication origin pg_16395 in the above case).  The
    transaction that produced the conflict can be skipped by using
-   ALTER SUBSCRIPTION ... SKIP with the finish LSN
+   ALTER SUBSCRIPTION ... SKIP
+   with the finish LSN
    (i.e., LSN 0/14C0378).  The finish LSN could be an LSN at which the transaction
    is committed or prepared on the publisher.  Alternatively, the transaction can
    also be skipped by calling the 
    pg_replication_origin_advance() function.
    Before using this function, the subscription needs to be disabled temporarily
-   either by ALTER SUBSCRIPTION ... DISABLE or, the
+   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()
index c8424bca15067bac86edefc81476979f4ec3725a..74fda82ed046de4333101c958ca476b07262b1e8 100644 (file)
@@ -51,7 +51,8 @@ ALTER PUBLICATION name RENAME TO 
    ADD and DROP clauses will add and
    remove one or more tables/schemas from the publication.  Note that adding
    tables/schemas to a publication that is already subscribed to will require an
-   ALTER SUBSCRIPTION ... REFRESH PUBLICATION action on the
+   
+   ALTER SUBSCRIPTION ... REFRESH PUBLICATION action on the
    subscribing side in order to become effective. Note also that
    DROP TABLES IN SCHEMA will not drop any schema tables
    that were specified using
index a85e04e4d6dcf63136d947063462df302f0b531a..ba708555300cb16db8ddb39e16dac42c2c53e44d 100644 (file)
@@ -85,7 +85,7 @@ ALTER SUBSCRIPTION name RENAME TO <
   Parameters
 
   
-   
+    id="sql-altersubscription-params-name">
     name
     
      
@@ -94,7 +94,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-connection">
     CONNECTION 'conninfo'
     
      
@@ -105,7 +105,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-setadddrop-publication">
     SET PUBLICATION publication_name
     ADD PUBLICATION publication_name
     DROP PUBLICATION publication_name
@@ -147,13 +147,14 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-refresh-publication">
     REFRESH PUBLICATION
     
      
       Fetch missing table information from publisher.  This will start
       replication of tables that were added to the subscribed-to publications
-      since CREATE SUBSCRIPTION or
+      since 
+      CREATE SUBSCRIPTION or
       the last invocation of REFRESH PUBLICATION.
      
 
@@ -192,7 +193,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-enable">
     ENABLE
     
      
@@ -202,7 +203,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-disable">
     DISABLE
     
      
@@ -212,7 +213,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-set">
     SET ( subscription_parameter [= value] [, ... ] )
     
      
@@ -232,7 +233,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-skip">
     SKIP ( skip_option = value )
     
      
@@ -272,7 +273,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-new-owner">
     new_owner
     
      
@@ -281,7 +282,7 @@ ALTER SUBSCRIPTION name RENAME TO <
     
    
 
-   
+    id="sql-altersubscription-params-new-name">
     new_name
     
      
index 2a67bdea91310cceff7db14f4dbbda76718bd0b4..d4f54c7170eac01204850ebb16e8c1945f6e9580 100644 (file)
@@ -40,7 +40,7 @@ DROP SUBSCRIPTION [ IF EXISTS ] name
   
    DROP SUBSCRIPTION cannot be executed inside a
    transaction block if the subscription is associated with a replication
-   slot.  (You can use <command>ALTER SUBSCRIPTION> to unset the
+   slot.  (You can use <link linkend="sql-altersubscription">ALTER SUBSCRIPTION> to unset the
    slot.)
   
  
@@ -87,9 +87,11 @@ DROP SUBSCRIPTION [ IF EXISTS ] name
    replication slot cannot be dropped or does not exist or never existed,
    the DROP SUBSCRIPTION command will fail.  To proceed
    in this situation, first disable the subscription by executing
-   ALTER SUBSCRIPTION ... DISABLE, and then disassociate
+   
+   ALTER SUBSCRIPTION ... DISABLE, and then disassociate
    it from the replication slot by executing
-   ALTER SUBSCRIPTION ... SET (slot_name = NONE).
+   
+   ALTER SUBSCRIPTION ... SET (slot_name = NONE).
    After that, DROP SUBSCRIPTION will no longer attempt any
    actions on a remote host.  Note that if the remote replication slot still
    exists, it (and any related table synchronization slots) should then be