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 1n5Rtl-0008Jb-Nf for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 12:29:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n5Rtk-0000dz-KK for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Jan 2022 12:29: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 1n5Rtk-0000dq-Al for pgsql-hackers@lists.postgresql.org; Thu, 06 Jan 2022 12:29:40 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n5Rth-0003SE-8q for pgsql-hackers@postgresql.org; Thu, 06 Jan 2022 12:29:39 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 96BCE5C0156; Thu, 6 Jan 2022 07:29:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 06 Jan 2022 07:29:34 -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=sKANBx7CAZWCW1x3e55E0wP2+g3CcK5mCdjZ7iIOEwc=; b=M3BGJoEX sD/UkOjMao7f93iJiEYTqCZc+796zrDw4yvXE05ksKwaR3TR1gNAfL1FeR1nuH9L sKLOag/vzvitKQZMhrbSRr58xR88onyQL2Fc+QtJpv+JN+eD0va12aXVSfhiJ/iU u4P/BmkxCNdoXL6FqZbg9GpsU5R5GXZPo5m+/B/qzJJLxuAnfZjJQbR0AlpEIE52 Os4LaG0yfmV6SSZ8wsh+GJAFS30IAh85203o02khRmoRx6y4bGMaoXrsjNVDAkS/ iRmc9xV9SC4UWDHlU0NOfK/Hl5hQOz1NWnLTDcMcKmo2OFeNyoNAhPyoLLQ4HHFP tMb9nTYA4VUC9w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudefledggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Jan 2022 07:29:33 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 3A64C2A073A; Thu, 6 Jan 2022 09:29:31 -0300 (-03) Date: Thu, 6 Jan 2022 09:29:31 -0300 From: Alvaro Herrera To: Amit Kapila Cc: Peter Eisentraut , Rahila Syed , PostgreSQL-development Subject: Re: Column Filtering in Logical Replication Message-ID: <202201061229.2djbvmxaddlp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-Jan-06, Amit Kapila wrote: > Considering this, don't we need to deal with "For All Tables" and "For > All Tables In Schema .." Publications in this query? The row filter > patch deal with such cases. The row filter patch handles the NULL case > via C code which makes the query relatively simpler. Yes. I realized after sending that email that the need to handle schema publications would make a single query very difficult, so I ended up splitting it again in two queries, which is what you see in the latest version submitted. > I am not sure if the same logic can be used here but having a simple > query here have merit that if we want to use a single query to fetch > both column and row filters then we should be able to enhance it > without making it further complicated. I have looked the row filter code a couple of times to make sure we're somewhat compatible, but didn't look closely enough to see if we can make the queries added by both patches into a single one. > Shouldn't we try to have a behavior similar to the row filter patch > for this case? The row filter patch behavior is as follows: "If your > publication contains a partitioned table, the publication parameter > publish_via_partition_root determines if it uses the partition row > filter (if the parameter is false, the default) or the root > partitioned table row filter. During initial tablesync, it doesn't do > any special handling for partitions. I'll have a look. Thanks for looking! -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/