Re: [PATCH] Add max_logical_replication_slots GUC
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Ahmed Et-tanany <ahmed.ettanany@aiven.io>
Cc: Fujii Masao <masao.fujii@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, pgsql-hackers@lists.postgresql.org
Date: 2026-02-11T12:09:37Z
Lists: pgsql-hackers
On Thu, Jan 29, 2026 at 6:31 PM Ahmed Et-tanany <ahmed.ettanany@aiven.io> wrote: > > 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. > Won't the walsender automatically exit if the max_logical_replication_slots is reached? If so, do we really need a separate GUC to control logical walsenders? -- With Regards, Amit Kapila.