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 1mUpfs-0000GP-Qp for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 12:24:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mUpfr-0002XH-Qz for pgsql-hackers@arkaria.postgresql.org; Mon, 27 Sep 2021 12:23:59 +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 1mUpfr-0002X8-3O for pgsql-hackers@lists.postgresql.org; Mon, 27 Sep 2021 12:23:59 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mUpfo-00072G-NE for pgsql-hackers@postgresql.org; Mon, 27 Sep 2021 12:23:58 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 95DDE32005D8; Mon, 27 Sep 2021 08:23:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 27 Sep 2021 08:23:55 -0400 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= fm3; bh=bDTzP7KKhbwb0+CJNaLV3ikHwZX6fXvCds7Zkqj3khU=; b=ZERwzp0Y byEEjB3BtFzF8mWI/bUDP9qdMlS8pjISiDvlYXemOPLheclSqSj7d6iA7VM8tVeF yQjdX66KvJWtTV5hNgXqFL1B9XMpU9D76Mw5ILd7bQVPQgeMy1L9f/w8Yta5GrY3 w7MqXeZFUNGgHiRodhaQhmVa0KfFBs0vsRica20GyoaIjK2fJ5SiIDjUatQ0vzky UTi2A32oxUt7U2m7drJjdmNOe8cQEcoDY4lxcHwDzKhq7rxwr8ysFNizCd8RtRVJ IObPYmdhS0K3CH2KJ7uUMh/yPg0aJIKupcyQdC0aYK6Ddrk6NQ1LsZZrK3EKMdRG NY8LXQ/l8TUpLA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudejkedghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Sep 2021 08:23:53 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C93822A0677; Mon, 27 Sep 2021 09:23:49 -0300 (-03) Date: Mon, 27 Sep 2021 09:23:49 -0300 From: Alvaro Herrera To: Amit Kapila Cc: vignesh C , Rahila Syed , Tomas Vondra , Peter Smith , PostgreSQL-development Subject: Re: Column Filtering in Logical Replication Message-ID: <202109271223.pw2dggvhq2mz@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 2021-Sep-27, Amit Kapila wrote: > I am not sure what makes you say that we can't distinguish the above > cases when there is already a separate rule for CURRENT_SCHEMA? I > think you can distinguish by tracking the previous objects as we are > already doing in the patch. But one thing that is not clear to me is > is the reason to introduce a new type PUBLICATIONOBJ_CURRSCHEMA when > we use PUBLICATIONOBJ_REL_IN_SCHEMA and PUBLICATIONOBJ_CONTINUATION to > distinguish all cases of CURRENT_SCHEMA. Alvaro might have something > in mind for this which is not apparent and that might have caused > confusion to you as well? My issue is what happens if you have a schema that is named CURRENT_SCHEMA. In the normal case where you do ALL TABLES IN SCHEMA "CURRENT_SCHEMA" you would end up with a String containing "CURRENT_SCHEMA", so how do you distinguish that from ALL TABLES IN SCHEMA CURRENT_SCHEMA, which does not refer to the schema named "CURRENT_SCHEMA" but in Vignesh's proposal also uses a String containing "CURRENT_SCHEMA"? Now you could say "but who would be stupid enough to do that??!", but it seems easier to dodge the problem entirely. AFAICS our grammar never uses String "CURRENT_SCHEMA" to represent CURRENT_SCHEMA, but rather some special enum value. -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/