Re: [PATCH] Add max_logical_replication_slots GUC - Mailing list pgsql-hackers

From Ahmed Et-tanany
Subject Re: [PATCH] Add max_logical_replication_slots GUC
Date
Msg-id CAD7nQBCwWj=v0QE6HL3BDOPrbqE1raniZ6DRPi_cyLxv81+HJQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add max_logical_replication_slots GUC  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: [PATCH] Add max_logical_replication_slots GUC
List pgsql-hackers
On Thu, Jan 29, 2026 at 12:39 PM Fujii Masao <masao.fujii@gmail.com> wrote:

Would something like max_logical_wal_senders also be needed for your purpose?
Otherwise, logical replication connections could exhaust max_wal_senders and
prevent physical replication connections from being established.

That said, adding two separate GUC parameters (i.e.,
max_logical_replication_slots
and max_logical_wal_senders) for this purpose doesn't seem like a
great solution,
though...


That's a great point! I'm thinking we could potentially avoid
introducing a separate max_logical_wal_senders GUC by reusing
max_logical_replication_slots to decide whether a WAL sender can
start for logical replication.

This way, the limit on logical slots would also indirectly cap
the number of logical WAL senders, helping protect physical
replication connections without adding another configuration
parameter.

What do you think about this approach? 

Best regards,

--
Ahmed Et-tanany
Aiven: https://aiven.io/

pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: Custom oauth validator options
Next
From: "Euler Taveira"
Date:
Subject: Re: [PATCH] Add max_logical_replication_slots GUC