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 1m3fRs-0006xo-8m for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 14:01:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3fRq-0002vk-Sb for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Jul 2021 14:01:14 +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 1m3fRq-0002vc-KP for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 14:01:14 +0000 Received: from new2-smtp.messagingengine.com ([66.111.4.224]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m3fRn-0005aS-PR for pgsql-hackers@lists.postgresql.org; Wed, 14 Jul 2021 14:01:13 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id AA8FD580447; Wed, 14 Jul 2021 10:01:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 14 Jul 2021 10:01:09 -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=83fHFXw0FK3uIEBeJYu7Kh45/Ze2NC00k+R/mb3bEC0=; b=WmaS5fzx D4YUHoUwV1eC1tSMDqRAVc1o1VaeUmnTo+I7elJfboX8xH9g9ALaLBLJ3CAFLYvE KHYW7222+4VOKJTvsufloL6BhjwM3eKGKCvFsqSK0M7eSpHZIPS+3Fj39CHI3riw oohcGxgS5o3gbKYAGzvNlDiSCxuPaQMYZerDx8XNil2Llj/OHUFP1BIj6XUAlFnc zok0ZcpVd52mqCozPNn28Yo76LbMGp15CGOaVT7+z3pEnZtqP1BtPJnJZC5OZHwY 6c/B2bqtuJUmUuGDgaVIH7pp44ATkfY+qiaWyAFeXq+oOnaJrsewiVRDZsMmFo// QTgyqngzarISFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekgdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgheqne cuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeevjedu feeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgv rhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jul 2021 10:01:08 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5FB572A038C; Wed, 14 Jul 2021 10:01:05 -0400 (-04) Date: Wed, 14 Jul 2021 10:01:05 -0400 From: Alvaro Herrera To: Dilip Kumar Cc: Tomas Vondra , Amit Kapila , Euler Taveira , Peter Smith , Rahila Syed , Peter Eisentraut , =?utf-8?B?w5ZuZGVyIEthbGFjxLE=?= , japin , Michael Paquier , David Steele , Craig Ringer , Tomas Vondra , Amit Langote , PostgreSQL Hackers Subject: Re: row filtering for logical replication Message-ID: <202107141401.zj6zabriddtt@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-Jul-14, Dilip Kumar wrote: > I think for insert we are only allowing those rows to replicate which > are matching filter conditions, so if we updating any row then also we > should maintain that sanity right? That means at least on the NEW rows > we should apply the filter, IMHO. Said that, now if there is any row > inserted which were satisfying the filter and replicated, if we update > it with the new value which is not satisfying the filter then it will > not be replicated, I think that makes sense because if an insert is > not sending any row to a replica which is not satisfying the filter > then why update has to do that, right? Right, that's a good aspect to think about. I think the guiding principle for which tuple to use for the filter is what is most useful to the potential user of the feature, rather than what is the easiest to implement. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/ "La libertad es como el dinero; el que no la sabe emplear la pierde" (Álvarez)