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 /src/backend/replication/logical/launcher.c | |
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 'src/backend/replication/logical/launcher.c')
-rw-r--r-- | src/backend/replication/logical/launcher.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index a3c7adbf1a8..10677da56b2 100644 --- a/src/backend/replication/logical/launcher.c +++ b/src/backend/replication/logical/launcher.c @@ -31,7 +31,7 @@ #include "postmaster/bgworker.h" #include "postmaster/interrupt.h" #include "replication/logicallauncher.h" -#include "replication/slot.h" +#include "replication/origin.h" #include "replication/walreceiver.h" #include "replication/worker_internal.h" #include "storage/ipc.h" @@ -325,10 +325,10 @@ logicalrep_worker_launch(LogicalRepWorkerType wtype, subname))); /* Report this after the initial starting message for consistency. */ - if (max_replication_slots == 0) + if (max_active_replication_origins == 0) ereport(ERROR, (errcode(ERRCODE_CONFIGURATION_LIMIT_EXCEEDED), - errmsg("cannot start logical replication workers when \"max_replication_slots\"=0"))); + errmsg("cannot start logical replication workers when \"max_active_replication_origins\"=0"))); /* * We need to do the modification of the shared memory under lock so that |