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 1n4Oqe-0000PT-MH for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 15:02:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n4Oqc-0006E1-Tm for pgsql-hackers@arkaria.postgresql.org; Mon, 03 Jan 2022 15:02:06 +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 1n4Oqc-0006Ds-Ki for pgsql-hackers@lists.postgresql.org; Mon, 03 Jan 2022 15:02:06 +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 1n4Oqa-0004HP-7H for pgsql-hackers@postgresql.org; Mon, 03 Jan 2022 15:02:05 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1A2235C0042; Mon, 3 Jan 2022 10:02:03 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 03 Jan 2022 10:02:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=onFMm8V/MPEaSbSrNx9ooYorvaUy6klel6RHziVXknE=; b=dCLHclU1 CUuDFbJLEvSpvJxRE8iSObGs0Vt5BR0Vwn+TezaBGyQDBa23kXmwe0uakf64CX6A lIIPBxVRoBYlQb095137imFi44q4H7fKxifKSXI94Z7HKUQn/mbiP/Zca/f7AHcU mCDl1gl6Pe3WVhtFAmVYoZE8I9jBaObOK9RV0yx5GIYU23B/hGhXHyRvES/PBooE 8licjgPkgWxrWszh7uO6veYA14QI8YFa9GBEGYv30E3rmmCGhru7RWo+ZN/dnX9A 67iXHznuaMrKiVmsZbHjLKZY2S0Tn6UmxZqV+gSyorBX8iOcxVCVKTUqKP9qkDbc isKR9NhATalCbw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefuddgjeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Jan 2022 10:02:02 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 626342A07D0; Mon, 3 Jan 2022 12:01:59 -0300 (-03) Date: Mon, 3 Jan 2022 12:01:59 -0300 From: Alvaro Herrera To: Justin Pryzby Cc: Tomas Vondra , Amit Kapila , Peter Eisentraut , "houzj.fnst@fujitsu.com" , Rahila Syed , Peter Smith , pgsql-hackers@postgresql.org Subject: Re: Column Filtering in Logical Replication Message-ID: <202201031501.gn2mtdiklb5y@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220103144056.GB24477@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jan-03, Justin Pryzby wrote: > Yes, I know both paths are hit now that it uses GetBool. > > What I'm wondering is why tests didn't fail when one path wasn't hit - when it > said am_partition=DatumGetChar(); if (!am_partition){} Ah! > I suppose it's because the am_partition=true case correctly handles > nonpartitions. > > Maybe the !am_partition case should be removed, and add a comment that > pg_partition_tree(pg_partition_root(%u))) also handles non-partitions. > Or maybe that's inefficient... Hmm, that doesn't sound true. Running the query manually, you get an empty list if you use pg_partition_tree(pg_partition_root) with a non-partition. Maybe what was happening is that all columns were being transmitted instead of only the required columns. Maybe you're right that the test isn't complete enough. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/