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 1vvUjN-004o7q-0f for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 06:20:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vvUjM-00AKKR-0I for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Feb 2026 06:20:12 +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 1vvUjL-00AKKI-2Z for pgsql-hackers@lists.postgresql.org; Thu, 26 Feb 2026 06:20:11 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vvUjI-00000001LNK-1jXn for pgsql-hackers@postgresql.org; Thu, 26 Feb 2026 06:20:11 +0000 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-389ebb0e885so4909631fa.1 for ; Wed, 25 Feb 2026 22:20:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772086808; cv=none; d=google.com; s=arc-20240605; b=lZkMGuf9tq4HyS9YQ8apl4UDEXAic0pM9mdmsM4bekl/Fq8K35zJtZLHX5C4d9SK0Q AInpDawEoE9b6DWGgqflakNMUDsB3FMtzd0uxAsmJ4tFyhHzWflnb0ZquSI2nFZ/tgt9 4dCNuzYo1k3hgXGFq0cjmImAsvER8GGBTqpAKcHehQaPdIFUN8kkZTLXigsljGLz3h82 Z7kmW1y0bXa5WvwlgQYZTgHXNm4MAa63KTJfQd29Sf+9f9LpXmWC32a/VdwK6X0ODBwU meRdyzi5wfTS3Sn89KtMF1oLVsTa1LcJBl2qppWW1v9lKpzxS9R48eByeVEkGpVPSMfP wGvQ== 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=9MZX6JDRnGMwNs7dXcBXsnUhl3qt6d7xous08pTw4+k=; fh=G7+5TDIL5ziqoujTGjsF/ks/ombODRQLiOTsdU9aUCg=; b=d9+9A05UcyDq1Pr6wGMoDYJ5DjEnW9D9IjH/W+ilP1X0rcmhLYl5krrg8oPXsmaEFf 4CiE3oOe2aJUxRNfmOk97Lp1ia8WclXHUzknCUEAhTbyVhg8Y8TO/bBc3R32xFeS5GJd xVQVGJ74vQAcn++O/aAOm+SECwKMIs6WXZ9jeLHpbi35AAoP+IkzpcEHUiVfIMXIwDoL x5srQKGRvs5WTQw74Wb+7DoBys5EsKuAd4+BNi6gD03KF72AfryQFb9Drcp/Jn19f0PF 6Bh21zjazxYp6VpltzOvf8lxMPEXUjqapx1mci18GYNp9WHHUH4hEvJoaGrjwwDpWN9p aCVA==; darn=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=20230601; t=1772086808; x=1772691608; darn=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=9MZX6JDRnGMwNs7dXcBXsnUhl3qt6d7xous08pTw4+k=; b=ghDG8Q4s1xDIPaCvagYN3KUFpwBubdtn2hhS656ElFvqYKl93D2d5mtsb6/WEZR6Ca 8uYmffTeYKbk8PltRzAJTgzC9eVHZXI/JShQ9DTPPdMd0Ctl9mKSrHPu0CR1yykQMoW/ tU+V9Jo46oByrpiagcDex02lxKngRmtlG6SMzRCPNmENN0004x6xqOHBAro63vVvb/Dh sBSoDoRVqMu2GSIkYczQMN95GvXXG330gVUob88JLykgO4ashlnBbknC8xsoLYltjsZV z0zwOBx9LXaF4BKT7bXeAGoepH/e/14MUjC2eZB0w/DAfNLnhTFpk7vuKHPWgQIoXI4S SgoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772086808; x=1772691608; 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=9MZX6JDRnGMwNs7dXcBXsnUhl3qt6d7xous08pTw4+k=; b=he/e0Lz3AsonU30CG2YI72xKBYR9H12tQ0bypymUMOY/UnCEOGN2tv+9OkAdks6Nch NrnHBngdGEwrcINXhYLw2g2ZhFaiG4Xr6ewZc218gQxniNkApalKhkLhjZbP5DhVF1Pe wRy6RVRHZKl1mv3As0Ac3hYBczMQhbN4xIh2Xiupse39MekswcG2knCyg+5JdLuZ31+o CvD3UQvr8wnkXq7X57rq8gW8oIk3OVVl9OPIuJ8IO9OKMTgQOYg5zhcy+14gy/hnwvyN U1lZPJOTmpjA1jO5XsphBV3NyQEIX+uu6VFS+5aBotiKaLnWHEqE8vOhAGAittl9cOqo A+vg== X-Forwarded-Encrypted: i=1; AJvYcCW84PK/ozbIKWYiKBW0UucUR2UmA6Do5xn8zNUWeSmW/dCZfnlOOwk4ZSfn9I31cSYRgkmwcxMnMTi+dAdd@postgresql.org X-Gm-Message-State: AOJu0Yz60jrtQR/v/orA1uD2049CHzY76Po34gtTVoTAAV41OFW3LGAf n4OEyGc7Jz7HNw2gV2wPaaklKMau808uYjpR1KrwAGn1K1vdMoNSOphJALf/aYIXB6IUiQmBa7C z0XOS1SvJ/WbUTU3/FaJsGP3kbsu2z8o= X-Gm-Gg: ATEYQzxmOmPQ/ecmMCrn2/6GzH0eMpKiuT36QXoIE+Ka2zchgjAmR4Hsq47GhE3Q2CZ 4HlLJaavHJMAQhMMT4/PAtcyST3UNYkU5rI8FeXdYNQ9c+zAQKjeK+56A4jypGE4QxWZNAaqnf3 L7w/CDenvmuFLwv0jTP/GLrPFARf/H8N2t5Trlqct1u0GVAL9+j1dgNzxXCAbj2c3pBoiK2C8LW Y5JEWoFmvjAequUZm9VREwqgEqNsIyslcHkVqJvLzdJPDlB7Dz3iNLHVJyLFwv+I1KeSA/SNyHx GsG45P+i0+Zi7UXt1PLH8v7AEfZyQl7rcJRhiHuzv+0qPx02zQrNcdOjYYmZ06p/NArRdlM9 X-Received: by 2002:a05:651c:31d2:b0:387:189d:18cd with SMTP id 38308e7fff4ca-389a5b2697cmr58216911fa.16.1772086807386; Wed, 25 Feb 2026 22:20:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Thu, 26 Feb 2026 11:49:53 +0530 X-Gm-Features: AaiRm52EuJ831ipFvrpHcLiJmE9wbCebKlZosh3F9I1umj-Z1B38PR1WyHWDxWs Message-ID: Subject: Re: synchronized_standby_slots behavior inconsistent with quorum-based synchronous replication To: Ashutosh Sharma Cc: SATYANARAYANA NARLAPURAM , PostgreSQL-development , PostgreSQL Hackers 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 On Thu, Feb 26, 2026 at 10:28=E2=80=AFAM Ashutosh Sharma wrote: > > > > > > > > Proposal: > > > > > > Make synchronized_standby_slots quorum aware i.e. extend the GUC to a= ccept an ANY M (slot1, slot2, ...) syntax similar to synchronous_standby_na= mes, so StandbySlotsHaveCaughtup() can return true when M of N slots (where= M <=3D N and M >=3D 1) have caught up. I still prefer two different GUCs f= or this as the list of slots to be synchronized can still be different (for= example, DBA may want to ensure Geo standby to be sync before allowing the= logical decoding client to read the changes). I kept synchronized_standby_= slots parse logic similar to synchronous_standby_names to keep things si= mple. The default behavior is also not changed for synchronized_standby_sl= ots. > > > ... > > Thinking about this further, using quorum settings for > synchronized_standby_slots can/will certainly result in at least one > sync standby lagging behind the logical replica, making it probably > impossible to continue with the existing logical replication setup > after a failover to the standby that lags behind. Here is what I am > mean: > But won't that be true even for synchronous_standby_names? I think in the case of quorum, it is the responsibility of the failover solution to select the most recent synced standby among all the standby's specified in synchronous_standby_names. Similarly here before failing over logical subscriber to one of physical standby, the failover tool needs to ensure it is switching over to the synced replica. We have given steps in the docs [1] that could be used to identify the replica where the subscriber can switchover. Will that address your concern? BTW, I have also suggested this idea in thread [2]. I don't recall all the ideas/points discussed in that thread but it would be good to check that thread for any alternative ideas and points raised, so that we don't miss anything. [1] - https://www.postgresql.org/docs/current/logical-replication-failover.= html [2] - https://www.postgresql.org/message-id/CAA4eK1KLFdmj8CLrZNL0D4phqyQihb= 7NXOjmqvrU5DT8moQn9Q%40mail.gmail.com --=20 With Regards, Amit Kapila.