From b237546ccfb3240cfc82b258230b114b3cea02ca Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 29 Nov 2022 13:29:09 +1100 Subject: [PATCH v5] Logical replication GUCs - links and tidy --- doc/src/sgml/config.sgml | 12 +++++ doc/src/sgml/logical-replication.sgml | 88 ++++++++++++++++++++++++++--------- 2 files changed, 78 insertions(+), 22 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 82df89b..48e531f 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4166,6 +4166,11 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows across the cluster without problems if that is required. + + For logical replication configuration settings refer + also to . + + Sending Servers @@ -4238,6 +4243,12 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows not pg_replication_origin) will prevent the server from starting. + + + See for more details + about setting max_replication_slots for logical + replication. + @@ -4914,6 +4925,7 @@ ANY num_sync ( for more details. diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index f875638..dd51940 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -1765,31 +1765,75 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER Configuration Settings - Logical replication requires several configuration options to be set. + Logical replication requires several configuration parameters to be set. - - On the publisher side, wal_level must be set to - logical, and max_replication_slots - must be set to at least the number of subscriptions expected to connect, - plus some reserve for table synchronization. And - max_wal_senders should be set to at least the same as - max_replication_slots plus the number of physical - replicas that are connected at the same time. - + + Publishers + + + wal_level must be + set to logical. + + + + max_replication_slots + must be set to at least the number of subscriptions expected to connect, + plus some reserve for table synchronization. + + + + max_wal_senders + should be set to at least the same as + max_replication_slots, plus the number of physical + replicas that are connected at the same time. + + + + + + Subscribers + + + max_replication_slots + must 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 (for apply workers), plus + some reserve for the table synchronization workers. + + + + max_sync_workers_per_subscription + controls the amount of parallelism of the initial data copy during the + subscription initialization or when new tables are added. + + + + + Notes + + + Logical replication workers are also affected by + wal_receiver_timeout, + wal_receiver_status_interval and + wal_receiver_retry_interval. + + + + Configuration parameter + max_worker_processes + may need to be adjusted to accommodate for replication workers, at least ( + max_logical_replication_workers + + 1). Some extensions and parallel queries also take + worker slots from max_worker_processes. + + + - - max_replication_slots must also be set on the subscriber. - 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 - also take worker slots from max_worker_processes. - -- 1.8.3.1