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 1w4pPq-002b33-3C for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 00:14:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w4pPp-0039we-1a for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Mar 2026 00:14:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w4pPp-0039wV-0e for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 00:14:37 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w4pPm-00000000mmY-3Kvn for pgsql-hackers@lists.postgresql.org; Tue, 24 Mar 2026 00:14:37 +0000 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-5a126c8aab9so3881412e87.0 for ; Mon, 23 Mar 2026 17:14:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774311274; cv=none; d=google.com; s=arc-20240605; b=AcwfRljIE4wcvi4RkX7Ot+sA2pqtHpD6cff6rGc0dk7q3aSTnz7K0RxKvsqzJWCe8Z 4u2e1eHVN0ykfvOofXVmfKh6v2Y3u8dikYUEuWJP8Y0XTyvekc397n5azOprWMP6q/Tw 97yaPfoFGQoLK4WLJNqFOkEC1ggQo+R4nytAaZqJwSi5fycscngjuBFQ6PhrWpkR669H fCR1hlA1w+GGMih67RC5HZWGjmBmQ0mhIRl5lhx1wyJRu17EkThVRvM5v1Dm0Bqm2bdc BTZaGW5/nhXjQxvbxC4Mx/y3cAAaSF07Al+91DpLv2p+isjqjQcwVJDARlX6cbbzi3U+ pjqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=OmmOZhWDoMiKJDcp7P1d6sooA0ojghhjRjGXttzRrkw=; fh=wi5zchVuwBURrzI8FmT3dDgSP7mh3ydLCfS1ivBTjmM=; b=JonhGy5LfNYIU3zLPEsmIuyMJwwiQGlc/ZnSNvFvSzs/XmdYsNzo8ZtGPmTRzhJCCs 1NUqGPoy4MRg1WnGwtQnx2A5WplpeRQdAZBxw+rc3ltOJ6BsgCJsAFTRONpHXFWUN3mm t6NxL5OrxnuC4kr3bAd2FkSctxUuAv5CC4eFD208HP60D9WzgLDcWVLcPldOhzs9uwGu Nb1Xi6wLmhUNckHv0sBDwdv3rvCHTIVEupnP8yzlZ1+lnlIrWyeyRSFkm9Z0T8hAMHXk UJC9uF7O0o2xYfWRpky5Zicq0HLDn/XS7gjnxN8bJ6T/o15oSgttDF9FKfYrwEhh1PK+ KpGQ==; 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=gmail.com; s=20251104; t=1774311274; x=1774916074; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=OmmOZhWDoMiKJDcp7P1d6sooA0ojghhjRjGXttzRrkw=; b=G4AbOAYagQwhe3llLk3RFuTCu/f2DibGr/UroAxZajHENpJzED4TzyH1wbeO9epqjY TpED2SGnIcZFI+PVw1xJL9QOA3FlNgAzUfWoTYt0hxWcuM1nkn21tKxUMggLvtjRAsa0 uh1svRHf5hqvouQwHEsE44RWI/7TR6zHzc3OEgpMLB5oGeacDEhv2TpMJGcgCDFvPpUy ccI2rj2zUqPHuxgwe/C2CP9XxqgJxA+QSoxD0SQVq1HHv91RpH8vwFRuUvc9jD3ipf8m MF9XRMDPDfbGd45HcFjkjSV/TV44GjoVtZs0HOYP6NQFiI83rmTRrRSVg2lP2rbTlXqP eY7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774311274; x=1774916074; h=content-transfer-encoding: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=OmmOZhWDoMiKJDcp7P1d6sooA0ojghhjRjGXttzRrkw=; b=KzXfRlraUREFbHLxZlI+enhZbk5PD7ziMzhm8spQVVgc0vviA0WV6mlX5aHN+zA5bf WKKIB2kWU5rLkePapYiuAmOgL3s+bxzsQj4Z+VjlEzVzAvz07lmMtEcveIRRRCXYBb17 g814x92RFDQTt/A7gH61PWq3fXTIRnH5lRJEhigL0AmCkBqMz04O2dfh32br3i4HyoVZ /R/U42eFC2kG06dSafnRhqy14XeG6+gzZJkiNI3Ocw9v6LiKURI2KhLGAXzimGCvCaEa dh8L3l6YRBe0U27jiGpJWxFQU+sA0U7vFWzdsh1gKvZhyjpZ4tYAubGUJgqLNKVRdXla j/nw== X-Forwarded-Encrypted: i=1; AJvYcCXXn7oRyCStdCKlnhbIS688oPbluPh/JU8wA8o2RCBt+2DC1cMoBAILdNM6FbNgWjUoEZ08BHwkxd4ag0E3@lists.postgresql.org X-Gm-Message-State: AOJu0YxxdShfXevWxxLfOjDPueu9iAKGYv9qG7slb2iwkc3fhZNQ3fIx YMOPhji4djyaXV/+6DYdV9JoOs9XUEi/K5cN/J3sqCqv17To/XpYRezOQe5Bjcd5dBqOMUhhbo5 GfBMK4twOuBQrglU2xJMWsNZll2g3dr4= X-Gm-Gg: ATEYQzxJWrCBtqvkhOQz2WYhD8bx63mluQu7lVmT/hw5SxVB8ZnG53cH1xEjoapZiI4 d5iAhCCpObeCL1XC4BKwmymL+tKbhuoAJY51kuEn7PVmdEV0ElKSXEQ5gcS0gjPG4QtDHQs3fyh d403WaL61gj5J6OT+TVsiIZj0JqNO8sX6o7IWiH7JPd+ASBUDtz0+0edHKksiTN7F5rJgFyYpL8 1Q1/1xT6EzJOOinS/RZuqLxYcRRoZ384HfJnNSJqlURGM8IkXgbRHBbf2pHlkP77qnSogojumg/ JXZ0DIqJ X-Received: by 2002:a05:6512:318f:b0:5a2:844b:d47e with SMTP id 2adb3069b0e04-5a285aef82amr4065353e87.1.1774311274102; Mon, 23 Mar 2026 17:14:34 -0700 (PDT) MIME-Version: 1.0 References: <202601281248.qjv5oru7hxlz@alvherre.pgsql> In-Reply-To: From: Masahiko Sawada Date: Mon, 23 Mar 2026 17:13:57 -0700 X-Gm-Features: AQROBzCkzcCUYW73KhpInOfgEQdJV4_ZbYyf-oWmDMyJiP01-DaxKC8ZTx5Z0Ds Message-ID: Subject: Re: [PATCH] Add max_logical_replication_slots GUC To: shveta malik Cc: Fujii Masao , Ahmed Et-tanany , =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Mon, Mar 9, 2026 at 11:55=E2=80=AFPM shveta malik wrote: > > On Thu, Jan 29, 2026 at 5:10=E2=80=AFPM Fujii Masao wrote: > > > > On Wed, Jan 28, 2026 at 10:02=E2=80=AFPM Ahmed Et-tanany > > wrote: > > > > > > Yes, that's what I meant. > > > > Would something like max_logical_wal_senders also be needed for your pu= rpose? > > Otherwise, logical replication connections could exhaust max_wal_sender= s and > > prevent physical replication connections from being established. > > > > I could be mistaken, but I haven=E2=80=99t 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=3Dlocalhost port=3D5432 user=3Duser1 dbname=3Dpostgres > replication=3Ddatabase" > > 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 =E2=80=94 in which case, > wouldn=E2=80=99t a single GUC suffice? In an extreme case like where if all walsenders are used up by logical walsender who are just connecting and not using logical replication slots, physical replication cannot start even if there is a free physical replication slot. But I think it's sufficient to have something like max_logical_replication_slots in most cases. So a single GUC seems to suffice unless I'm not missing some cases. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com