From 6283725f5ea91d0a153b840ff40823cd88d5dbf6 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Mon, 1 Mar 2021 17:08:50 +0530 Subject: [PATCH v1] Clarify the usage of max_replication_slots on the subscriber side. 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 Discussion: https://postgr.es/m/CACqFVBZgwCN_pHnW6dMNCrOS7tiHCw6Retf_=U2Vvj3aUSeATw@mail.gmail.com --- doc/src/sgml/config.sgml | 11 +++++++++++ doc/src/sgml/logical-replication.sgml | 11 ++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index b5718fc..967de73 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4001,6 +4001,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. + diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 9cd3f3f..e95d446 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -603,11 +603,12 @@ 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, plus some reserve for - table synchronization. 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, plus some reserve for table synchronization. + 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 -- 1.8.3.1