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 --- src/backend/utils/misc/guc_tables.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/backend/utils/misc/guc_tables.c') diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 97cfd6e5a82..17d28f458f2 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -3374,6 +3374,18 @@ struct config_int ConfigureNamesInt[] = NULL, NULL, NULL }, + { + {"max_active_replication_origins", + PGC_POSTMASTER, + REPLICATION_SUBSCRIBERS, + gettext_noop("Sets the maximum number of active replication origins."), + NULL + }, + &max_active_replication_origins, + 10, 0, MAX_BACKENDS, + NULL, NULL, NULL + }, + { {"log_rotation_age", PGC_SIGHUP, LOGGING_WHERE, gettext_noop("Sets the amount of time to wait before forcing " -- cgit v1.2.3