Clarify the usage of max_replication_slots on the subscriber side.
authorAmit Kapila
Wed, 3 Mar 2021 05:00:27 +0000 (10:30 +0530)
committerAmit Kapila
Wed, 3 Mar 2021 05:00:27 +0000 (10:30 +0530)
It was not clear in the docs that the max_replication_slots is also used
to track replication origins on the subscriber side.

Author: Paul Martinez
Reviewed-by: Amit Kapila
Backpatch-through: 10 where logical replication was introduced
Discussion: https://postgr.es/m/CACqFVBZgwCN_pHnW6dMNCrOS7tiHCw6Retf_=U2Vvj3aUSeATw@mail.gmail.com

doc/src/sgml/config.sgml
doc/src/sgml/logical-replication.sgml

index ffe9f2d2877d47c7a9120a0fecbca9a441926d9e..da323621b53c758ddd2b169238db525a45d7b445 100644 (file)
@@ -3781,6 +3781,17 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"'  # Windows
          to replica or higher to allow replication slots to
          be used.
         
+
+        
+         On the subscriber side, specifies how many replication origins (see
+         ) can be tracked simultaneously,
+         effectively limiting how many logical replication subscriptions can
+         be created on the server. Setting it a lower value than the current
+         number of tracked replication origins (reflected in
+         pg_replication_origin_status,
+         not pg_replication_origin)
+         will prevent the server from starting.
+        
        
       
 
index c9a3c6fbcb48623a0a1f3f0675e86384ffcf3886..43b7e824cb67f2897863c9397eb18b80823bfef9 100644 (file)
 
   
    The subscriber also requires the max_replication_slots
-   to be set.  In this case it should be set to at least the number of
-   subscriptions that will be added to the subscriber.
-   max_logical_replication_workers must be set to at
-   least the number of subscriptions, again plus some reserve for the table
-   synchronization.  Additionally the max_worker_processes
+   be set to configure how many replication origins can be tracked.  In this
+   case it should be set to at least the number of subscriptions that will be
+   added to the subscriber.  max_logical_replication_workers
+   must be set to at least the number of subscriptions, again plus some reserve
+   for the table synchronization.  Additionally the max_worker_processes
    may need to be adjusted to accommodate for replication workers, at least
    (max_logical_replication_workers
    + 1).  Note that some extensions and parallel queries