From 04ff636cbce4b91fba1f334e1bc0dc88686e7b2d Mon Sep 17 00:00:00 2001 From: Masahiko Sawada Date: Fri, 21 Mar 2025 12:20:15 -0700 Subject: Add GUC option to control maximum active replication origins. This commit introduces a new GUC option max_active_replication_origins to control the maximum number of active replication origins. Previously, this was controlled by 'max_replication_slots'. Having a separate GUC option provides better flexibility for setting up subscribers, as they may not require replication slots (for cascading replication) but always require replication origins. Author: Euler Taveira Reviewed-by: Amit Kapila Reviewed-by: Masahiko Sawada Reviewed-by: Peter Eisentraut Reviewed-by: vignesh C Discussion: https://postgr.es/m/b81db436-8262-4575-b7c4-bc0c1551000b@app.fastmail.com --- doc/src/sgml/config.sgml | 26 +++++++------------------- doc/src/sgml/logical-replication.sgml | 10 ++++------ doc/src/sgml/ref/pg_createsubscriber.sgml | 2 +- 3 files changed, 12 insertions(+), 26 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index bdcefa8140b..f923ca13a74 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4476,13 +4476,6 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows to replica or higher to allow replication slots to be used. - - - Note that this parameter also applies on the subscriber side, but with - a different meaning. See - in for more - details. - @@ -5228,10 +5221,10 @@ ANY num_sync ( - max_replication_slots (integer) + + max_active_replication_origins (integer) - max_replication_slots configuration parameter + max_active_replication_origins configuration parameter in a subscriber @@ -5243,18 +5236,13 @@ ANY num_sync ( pg_replication_origin_status) - will prevent the server from starting. - max_replication_slots must be set to at least the + will prevent the server from starting. It defaults to 10. This parameter + can only be set at server start. + + max_active_replication_origins must be set to at least the number of subscriptions that will be added to the subscriber, plus some reserve for table synchronization. - - - Note that this parameter also applies on a sending server, but with - a different meaning. See - in for more - details. - diff --git a/doc/src/sgml/logical-replication.sgml b/doc/src/sgml/logical-replication.sgml index 3d18e507bbc..3556ce7cb46 100644 --- a/doc/src/sgml/logical-replication.sgml +++ b/doc/src/sgml/logical-replication.sgml @@ -2370,10 +2370,8 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER Configuration Settings - Logical replication requires several configuration options to be set. Most - options are relevant only on one side of the replication. However, - max_replication_slots is used on both the publisher and - the subscriber, but it has a different meaning for each. + Logical replication requires several configuration options to be set. These + options are relevant only on one side of the replication. @@ -2413,7 +2411,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER Subscribers - max_replication_slots + max_active_replication_origins must be set to at least the number of subscriptions that will be added to the subscriber, plus some reserve for table synchronization. @@ -2580,7 +2578,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER The new cluster must have - max_replication_slots + max_active_replication_origins configured to a value greater than or equal to the number of subscriptions present in the old cluster. diff --git a/doc/src/sgml/ref/pg_createsubscriber.sgml b/doc/src/sgml/ref/pg_createsubscriber.sgml index 380d0b1c35c..d011b79e5e6 100644 --- a/doc/src/sgml/ref/pg_createsubscriber.sgml +++ b/doc/src/sgml/ref/pg_createsubscriber.sgml @@ -334,7 +334,7 @@ PostgreSQL documentation The target server must be used as a physical standby. The target server - must have and and configured to a value greater than or equal to the number of specified databases. The target server must have configured to a -- cgit v1.2.3