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

From shveta malik
Subject Re: [PATCH] Add max_logical_replication_slots GUC
Date
Msg-id CAJpy0uC3aJzu_1zsaShL0UAy763MuJ3KOBZORb-a842NQ41tpg@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 5:10 PM Fujii Masao <masao.fujii@gmail.com> wrote:
>
> On Wed, Jan 28, 2026 at 10:02 PM Ahmed Et-tanany
> <ahmed.ettanany@aiven.io> wrote:
> >
> > Yes, that's what I meant.
>
> 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.
>

I could be mistaken, but I haven’t found a way to start a logical
replication stream without a replication slot. A replication
connection and walsender can exist without a slot, for example:
./psql "host=localhost port=5432 user=user1 dbname=postgres
replication=database"

However, converting that connection to logical replication requires a
slot from the max_logical_replication_slots pool. If that pool is
exhausted, the connection cannot be converted — in which case,
wouldn’t a single GUC suffice?

I might be missing something — are you referring to a different scenario?
One possibility is if max_wal_senders is lower than
max_logical_replication_slots, which could exhaust WAL senders for
logical connections, though that would mostly be a configuration
issue. Isn't it?

thanks
Shveta



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: [PATCH] Support automatic sequence replication
Next
From: jian he
Date:
Subject: Re: domain for WITHOUT OVERLAPS