Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlReU-00CH0i-2L for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 13:01:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlReT-008pGu-2T for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 13:01:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vlReT-008pGe-0y for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 13:01:37 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vlReQ-002v3q-2q for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 13:01:36 +0000 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-64b7318f1b0so1301254a12.2 for ; Thu, 29 Jan 2026 05:01:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769691694; cv=none; d=google.com; s=arc-20240605; b=kg0qVIqA4uUvHG+0WSeL0vfQ7juYPpTKSvCbz3y8CX2vDh38WXKhN9DzWXUKz7nloj QKBgIPnSJk2xK+9gfepDBz/BEafaD/7TIDYboJGT2/wrxzXSac3lWTqP55Smirf/QoL7 mMXhOD+x1A9EB9d5GFNNjgzMPAVEfHR0rFCykVKnPM/r5TY4L0v/UzHwsl2c2OJtrUPL FOrA89GszhtjFQcWjC//44u5HTNSiPzrWoMs77iRbPsgdCikj6G2GfVtekbR58xpCfd5 NiR+P81bc3BQLSjeuYPqaUY2M3egUfXYa7M4ytNCS5zj4AiFMKbRKUsuq7ZuhiWJtA5Q QUww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=YqNnDoWPXll2u9v7QENg81lvOQ/7QnzrYj+wsJxh538=; fh=uSLKUl38oShBxxJzdHC8CIefm6vKsXlPuqKM7LA/Zp8=; b=aDfyyOrExdvtY891zPTn//Y9+I451E3GT270SbzDaSagulCLpABnIaZNTcVddkdDfM QpCbWiblGqwl5I5gOx5CE1cQtfUlFkQb7w/PbXRZjL9Q3rSOYJPwwFEizwXuFzkZyh4u TBjbsR3JpbxnzBeHUR03ILFSY7+BfM7Oj61gEZgrlv85v7latgA3M7Ihk8Sw3fIcsYNF zn/OBpKSEmX/AL4guEKqPbvP+flTOpc10jNMfKoQDoaqp4JAY/O0azTx9l5b6bENb6QF BQcOv8XsxeOEN44M/DU9uPTGeg+dbod7eHp8T99w7wubrKqGRACIHE31xsobWA+qbKMt /CHA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aiven.io; s=google; t=1769691694; x=1770296494; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YqNnDoWPXll2u9v7QENg81lvOQ/7QnzrYj+wsJxh538=; b=oSEltAezacQKQlY7im2ycJfJVHGFrvaAZhqdW/A/y4BnSyM7sDx57elnyO67SQKkCD xS6F4cgg+njafJ9JKzPCkvr2TEUE+CWxaxTdwAUDRF3mKMo1vDQ6flTRQ0204obYswgF 4znWNczip5p2zOSU7bGkc70OBJZ8onM+lxiw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769691694; x=1770296494; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YqNnDoWPXll2u9v7QENg81lvOQ/7QnzrYj+wsJxh538=; b=HbJeeAIOzXtByWYxci0ezgrnHDpjJn80zyzW6IXvzTLCdoO6PvkEeTIScBtAP035b4 AjZ43pmoJ+exMD33+kc3135CLPPMoDUQNaIfktr457ZM9jvJ9Okh6YLmFVtYebA+ZbJs YJuuT7+eOQwE6f9pDvyrXPswXNdNq46dM1OhvlgklTeH0D595PYI2LRSjwf1xOCoSTCH uC9N7bACD7G1GPcrSqGBF30MdulVbC5BeAeQx59UZ5MA+TmWhv5SARHubtcWos/lHIiy 75ej9WcMXlar+LWmShl+9yqqr8AxBUX1SOL8Chb9tuI8xVIc5f0rMHtqo+kiMzOOSz5C vdRw== X-Forwarded-Encrypted: i=1; AJvYcCUFMqN4lUlpmi6V/3thA+D9XTTnqrEoh11gD8EOUxCPu4gRFGzB5KedlmKK5qTh0bbRk8hWXahKZ/KxQkgr@lists.postgresql.org X-Gm-Message-State: AOJu0Yz+NbDFg0+hXoMI0PU8S8DeleeZL3ALVCzYFdtsnH7otVeUX3rJ c2FjxSZEyWa3s38in3aRcRdnAWq0hCQUDfZ8hHD8QNHFF9K3SrLsVq+++x2ugtOLAIxg2arduqo UM3cC0x2QgLdxBe2Nk+uqOmb9ruvcTSmGBzB8yR1mcQ== X-Gm-Gg: AZuq6aKaWeRwZNdbULoMLyiQ+0GBT9dnVIkt01Lx1d54Bxs2M4dCuAQ2mkPDfXPqG8V b0WjYW87simSYHERvs+KoGqt2BydIPkKYMPFEA9b3c0VC40KVYdo4R6ztuXsysHGdTVeZq1GiJ+ wvA1gssATZdqlKGvUg5kw7hhf/qwIywsdWFdEN6MTSMMOBmkNUJuKGikKN4urweg735hclwkZjF MQ/V1mBFj75hbiU8kk64bH9/wY6LLd3tF9+zt2+e3YOAAP4PTgjkNeJRuh2AHvyc8M3N78oQwzk V6JmUBzNG6pqhS9yIKB/FfyFUEzS4o5xeVzvEg== X-Received: by 2002:a17:906:f58e:b0:b8a:f225:edde with SMTP id a640c23a62f3a-b8dab37d046mr561862666b.45.1769691693956; Thu, 29 Jan 2026 05:01:33 -0800 (PST) MIME-Version: 1.0 References: <202601281248.qjv5oru7hxlz@alvherre.pgsql> In-Reply-To: From: Ahmed Et-tanany Date: Thu, 29 Jan 2026 14:01:22 +0100 X-Gm-Features: AZwV_Qjh79m3Rl-EKkXfBHhal0nplzrWQI03sewplkDhpBh36SMOuJbeWCBODdI Message-ID: Subject: Re: [PATCH] Add max_logical_replication_slots GUC To: Fujii Masao Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000c7d669064986742b" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c7d669064986742b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 29, 2026 at 12:39=E2=80=AFPM Fujii Masao 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, --=20 Ahmed Et-tanany Aiven: https://aiven.io/ --000000000000c7d669064986742b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Jan 29, 2026 at 12:39=E2=80=AFPM = Fujii Masao <masao.fujii@gmail.= com> wrote:

Would something like max_logical_wal_senders also be needed for your purpos= e?
Otherwise, logical replication connections could exhaust max_wal_senders an= d
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= 9;m thinking we could potentially avoid
introducing a separate max_logic= al_wal_senders GUC by reusing
max_logical_replication_slots to decide wh= ether a WAL sender can
start for logical replication.

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

What do you think ab= out this approach?=C2=A0

Best = regards,

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