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 1pFeKr-0005Qs-LR for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 16:52:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFeKq-0004k7-8s for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 16:52:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFeKp-0004jy-WC for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 16:52:20 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFeKn-0006Vn-Ll for pgsql-hackers@postgresql.org; Wed, 11 Jan 2023 16:52:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1CF325C015B; Wed, 11 Jan 2023 11:52:17 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Wed, 11 Jan 2023 11:52:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1673455937; x=1673542337; bh=pA83jj3nvJ oaRYwutSuOFeXLGkc8qJxJzR0G1XJMgZ0=; b=gskygRuQsST2OlGo4JliUOtbhK fAbXBkLYqS3uX9Rez1FV5Bs/0ISEa6FByWWNaCPukTeXVHtAs5d1gzvtznKnPNyd f4BDTd2ULe2iuzXWDJQRVD8pRugM9UU4aNAK87i+uoeAsYm2NVf5PoD4heZhbFd6 YwEZWxyTLXQSG8a9XJiwwaRDRUtgqq8Yal+/QdeidfaI34PRA2pRMeJjvFOBjAxp MsEF2T8bpl2XgBPPJpEPvcyF8evM6Jmz5VXLY+iB4sWAGxNSqvzuEzLxb7TzEBBN EAZ8bujeDV5z5wI62fB8wHDYlEORKMmBYpVUdAtPzSvEPts0f8zWo77DFRug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1673455937; x=1673542337; bh=pA83jj3nvJoaRYwutSuOFeXLGkc8 qJxJzR0G1XJMgZ0=; b=I4HPhqv2PvMH6Xe/pBvMaxTSQq9nuuzAcnmVnQekuLxA drje1M0u4CmTG4UOcsAKcNIpZqHQ8Ml/HQ+YYJk2M0sYXQik8u+1EywnPv0ADx6q Z1UkZHj0SxluPlMj6bXydMdGsBKOofY4ZxXXUFv4AkqrNNMAFt2aUPH3qJM97/z1 +w8JiAlJwOrFVKBHZMpCkpwh8zqQH4Yxuj8EXEqWqLckwNV/cNUMwRJsIczY+X6G S/etSLhV28de7yKi0LYcBzROQikOZtYi67RBP3DCsYcRJXs58xY3RqpNxgzsD/Uy AiDCs7QZgU7sZR7EE3Cnc47gLfkxqxLEbuHDyWOU2w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeggdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedvffefvefhteevffegieetfefhtddvffejvefhueetgeeludehteevudei tedtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Jan 2023 11:52:16 -0500 (EST) Date: Wed, 11 Jan 2023 08:52:15 -0800 From: Andres Freund To: Bharath Rupireddy Cc: "Drouvot, Bertrand" , Robert Haas , Thomas Munro , Alvaro Herrera , Ibrar Ahmed , Amit Khandekar , fabriziomello@gmail.com, tushar , Rahila Syed , pgsql-hackers Subject: Re: Minimal logical decoding on standbys Message-ID: <20230111165215.44nfwrcy2jhse3cj@awork3.anarazel.de> References: <1f2ad9fd-53ff-74cc-a602-72d45423bcab@gmail.com> <05c0c4f3-82eb-bc6d-c876-5a265c05927b@gmail.com> <20230106034036.2m4qnn7ep7b5ipet@awork3.anarazel.de> <6f8503b7-93d6-e78d-1d61-09cfec4d59c9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2023-01-11 13:02:13 +0530, Bharath Rupireddy wrote: > 3. Is this feature still a 'minimal logical decoding on standby'? > Firstly, why is it 'minimal'? It's minimal in comparison to other proposals at the time that did explicit / active coordination between primary and standby to allow logical decoding. > 0002: > 1. > - if (InvalidateObsoleteReplicationSlots(_logSegNo)) > + InvalidateObsoleteOrConflictingLogicalReplicationSlots(_logSegNo, > &invalidated, InvalidOid, NULL); > > Isn't the function name too long and verbose? +1 > How about just InvalidateLogicalReplicationSlots() let the function comment > talk about what sorts of replication slots it invalides? I'd just leave the name unmodified at InvalidateObsoleteReplicationSlots(). > 2. > + errdetail("Logical decoding on > standby requires wal_level to be at least logical on master")); > + * master wal_level is set back to replica, so existing logical > slots need to > invalidate such slots. Also do the same thing if wal_level on master > > Can we use 'primary server' instead of 'master' like elsewhere? This > comment also applies for other patches too, if any. +1 > 3. Can we show a new status in pg_get_replication_slots's wal_status > for invalidated due to the conflict so that the user can monitor for > the new status and take necessary actions? Invalidated slots are not a new concept introduced in this patchset, so I'd say we can introduce such a field separately. Greetings, Andres Freund