Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSW3a-0008Ls-55 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 04:39:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pSW3Y-0003y8-T0 for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Feb 2023 04:39:40 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSW3Y-0003xz-K1 for pgsql-hackers@lists.postgresql.org; Thu, 16 Feb 2023 04:39:40 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pSW3U-0004dt-9Z for pgsql-hackers@postgresql.org; Thu, 16 Feb 2023 04:39:40 +0000 Received: by mail-pj1-x1034.google.com with SMTP id pg6-20020a17090b1e0600b002349579949aso565031pjb.5 for ; Wed, 15 Feb 2023 20:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=JDg6CT7HQSeb6ZMMEbCqE5R+3dCIyBZ6c5pnsvKRhsU=; b=STUOhsvzlSSbN/UxmoCZFDVq/ZOQjeUDdKnlRHm47qkkx7F7PLcTGXc6py+znnURyP pOzRYM5rxryHd0k4uJtMiKua1ov1Dq/U/DvxnctNS4OHpYfeurTcX9mP24saJAVfzL81 mYCC4qJUetSA9Z2frzLM4q5aGFhTXs0ZOKOqBbavg1LLp8kJmXgNPDHE+b7mN4yX2xB1 j93jhAX3Yw53B76aIbSGm4I0yBticzsC1sgdf8pnDz3Tzj+bhcYJSJYnXNSd975wPZl0 OK9D4hHd9suJlrAWISFYYvR5OZJNb/K7N0NSNHutymnm3GfdvfMEjbn+oG3InA00C0pW oYXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JDg6CT7HQSeb6ZMMEbCqE5R+3dCIyBZ6c5pnsvKRhsU=; b=NLqnTKARIcC2Sb7nbTox4g+8d0O1cq17nGYju88PaL6xV0CoWwhGzABAjdoyqzgjNr AbXfwkA9r2YEjdiksO3WwWL28jxk3rV6yOFd+bM2GibPb34CXu6jAscBhHAXhD1Y71jb Pbwz8qB3pHmWME8pCjIguYCjpatSgWEhmIu7PPkd2/ezJCDVKj/QvXa3KZyuOX/FIrJX x9oskEyUnOwUVDHqGU9rpw8C+cHHqNhfS06D6mdhHv/zjtaoOgzQwcxnUtuNGazskWys +1HLoZwh4KM3uDvKCNLuJbn2gASYvTTY7BykXcUbUxXHUuyrDl7m5c0qnGbBcsOSISkB Gc5w== X-Gm-Message-State: AO0yUKW6529zj/JUj1QRUq3fzPTjYaW0L4iP79F1J4n5mD5PTayTj+iz tGVdVF+WbTl2y8DtQn+Z/4kthYBaxGzxd4SqlKY= X-Google-Smtp-Source: AK7set8zvBZJZvTzhbXzvuvEdhuxPbH0TmrNsCGk4n8Hd2fQfTVPIjx0r3Q4oFRigH0Vc7hzg1Qk3JSVyZvCkjuazRA= X-Received: by 2002:a17:902:ec8e:b0:196:7555:f810 with SMTP id x14-20020a170902ec8e00b001967555f810mr1046674plg.7.1676522374031; Wed, 15 Feb 2023 20:39:34 -0800 (PST) MIME-Version: 1.0 References: <1f2ad9fd-53ff-74cc-a602-72d45423bcab@gmail.com> <05c0c4f3-82eb-bc6d-c876-5a265c05927b@gmail.com> <20230106034036.2m4qnn7ep7b5ipet@awork3.anarazel.de> <805540ba-b132-30f2-563d-cf9acc527008@gmail.com> <2d62f212-fce6-d639-b9eb-2a5bc4bec3b4@gmail.com> <20230112181630.lpqqty2vzuatgwcl@awork3.anarazel.de> <20230215181818.mhmwp3pvt3crtalo@awork3.anarazel.de> In-Reply-To: <20230215181818.mhmwp3pvt3crtalo@awork3.anarazel.de> From: Ashutosh Sharma Date: Thu, 16 Feb 2023 10:09:22 +0530 Message-ID: Subject: Re: Minimal logical decoding on standbys To: Andres Freund Cc: "Drouvot, Bertrand" , Robert Haas , Thomas Munro , Alvaro Herrera , Ibrar Ahmed , Amit Khandekar , fabriziomello@gmail.com, tushar , Rahila Syed , pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Feb 15, 2023 at 11:48 PM Andres Freund wrote: > > Hi, > > On 2023-02-15 18:02:11 +0530, Ashutosh Sharma wrote: > > Thanks Andres. I have one more query (both for you and Bertrand). I > > don't know if this has already been answered somewhere in this mail > > thread, if yes, please let me know the mail that answers this query. > > > > Will there be a problem if we mandate the use of physical replication > > slots and hot_standby_feedback to support minimum LD on standby. I > > know people can do a physical replication setup without a replication > > slot or even with hot_standby_feedback turned off, but are we going to > > have any issue if we ask them to use a physical replication slot and > > turn on hot_standby_feedback for LD on standby. This will reduce the > > code changes required to do conflict handling for logical slots on > > standby which is being done by v50-0001 and v50-0002* patches > > currently. > > I don't think it would. E.g. while restoring from archives we can't rely on > knowing that the slot still exists on the primary. > > We can't just do corrupt things, including potentially crashing, when the > configuration is wrong. We can't ensure that the configuration is accurate all > the time. So we need to detect this case. Hence needing to detect conflicts. > OK. Got it, thanks. > > > IMHO even in normal scenarios i.e. when we are not doing LD on > > standby, we should mandate the use of a physical replication slot. > > I don't think that's going to fly. There plenty scenarios where you e.g. don't > want to use a slot, e.g. when you want to limit space use on the primary. > I think this can be controlled via max_slot_wal_keep_size GUC, if I understand it correctly. -- With Regards, Ashutosh Sharma.