diff options
author | Masahiko Sawada <msawada@postgresql.org> | 2025-03-21 12:20:15 -0700 |
---|---|---|
committer | Masahiko Sawada <msawada@postgresql.org> | 2025-03-21 12:20:15 -0700 |
commit | 04ff636cbce4b91fba1f334e1bc0dc88686e7b2d (patch) | |
tree | b312f82dff3129a246c20f19e25aff7a803c8c06 /doc/src | |
parent | 0e032a2240a98669546023f7707030ea3ce4ded7 (diff) | |
download | postgresql-04ff636cbce4b91fba1f334e1bc0dc88686e7b2d.tar.gz postgresql-04ff636cbce4b91fba1f334e1bc0dc88686e7b2d.zip |
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 <euler@eulerto.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: vignesh C <vignesh21@gmail.com>
Discussion: https://postgr.es/m/b81db436-8262-4575-b7c4-bc0c1551000b@app.fastmail.com
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/config.sgml | 26 | ||||
-rw-r--r-- | doc/src/sgml/logical-replication.sgml | 10 | ||||
-rw-r--r-- | doc/src/sgml/ref/pg_createsubscriber.sgml | 2 |
3 files changed, 12 insertions, 26 deletions
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 <literal>replica</literal> or higher to allow replication slots to be used. </para> - - <para> - Note that this parameter also applies on the subscriber side, but with - a different meaning. See <xref linkend="guc-max-replication-slots-subscriber"/> - in <xref linkend="runtime-config-replication-subscriber"/> for more - details. - </para> </listitem> </varlistentry> @@ -5228,10 +5221,10 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" <variablelist> - <varlistentry id="guc-max-replication-slots-subscriber" xreflabel="max_replication_slots"> - <term><varname>max_replication_slots</varname> (<type>integer</type>) + <varlistentry id="guc-max-active-replication-origins" xreflabel="max_active_replication_origins"> + <term><varname>max_active_replication_origins</varname> (<type>integer</type>) <indexterm> - <primary><varname>max_replication_slots</varname> configuration parameter</primary> + <primary><varname>max_active_replication_origins</varname> configuration parameter</primary> <secondary>in a subscriber</secondary> </indexterm> </term> @@ -5243,18 +5236,13 @@ ANY <replaceable class="parameter">num_sync</replaceable> ( <replaceable class=" be created on the server. Setting it to a lower value than the current number of tracked replication origins (reflected in <link linkend="view-pg-replication-origin-status">pg_replication_origin_status</link>) - will prevent the server from starting. - <literal>max_replication_slots</literal> 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. + + <literal>max_active_replication_origins</literal> must be set to at least the number of subscriptions that will be added to the subscriber, plus some reserve for table synchronization. </para> - - <para> - Note that this parameter also applies on a sending server, but with - a different meaning. See <xref linkend="guc-max-replication-slots"/> - in <xref linkend="runtime-config-replication-sender"/> for more - details. - </para> </listitem> </varlistentry> 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 <title>Configuration Settings</title> <para> - Logical replication requires several configuration options to be set. Most - options are relevant only on one side of the replication. However, - <varname>max_replication_slots</varname> 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. </para> <sect2 id="logical-replication-config-publisher"> @@ -2413,7 +2411,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER <title>Subscribers</title> <para> - <link linkend="guc-max-replication-slots-subscriber"><varname>max_replication_slots</varname></link> + <link linkend="guc-max-active-replication-origins"><varname>max_active_replication_origins</varname></link> must be set to at least the number of subscriptions that will be added to the subscriber, plus some reserve for table synchronization. </para> @@ -2580,7 +2578,7 @@ CONTEXT: processing remote data for replication origin "pg_16395" during "INSER <listitem> <para> The new cluster must have - <link linkend="guc-max-replication-slots"><varname>max_replication_slots</varname></link> + <link linkend="guc-max-active-replication-origins"><varname>max_active_replication_origins</varname></link> configured to a value greater than or equal to the number of subscriptions present in the old cluster. </para> 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 <para> The target server must be used as a physical standby. The target server - must have <xref linkend="guc-max-replication-slots"/> and <xref + must have <xref linkend="guc-max-active-replication-origins"/> and <xref linkend="guc-max-logical-replication-workers"/> configured to a value greater than or equal to the number of specified databases. The target server must have <xref linkend="guc-max-worker-processes"/> configured to a |