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 1lk55d-0004Ru-48 for pgsql-performance@arkaria.postgresql.org; Fri, 21 May 2021 13:21: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 1lk55c-0004Np-3Z for pgsql-performance@arkaria.postgresql.org; Fri, 21 May 2021 13:21:20 +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 1lk55b-0004Nh-S9 for pgsql-performance@lists.postgresql.org; Fri, 21 May 2021 13:21:19 +0000 Received: from relay12.mail.gandi.net ([217.70.178.232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lk55Z-0002Pq-Eo for pgsql-performance@postgresql.org; Fri, 21 May 2021 13:21:19 +0000 Received: (Authenticated sender: adsend@dunslane.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 2E01620000E; Fri, 21 May 2021 13:21:14 +0000 (UTC) Subject: Re: logical replication To: Marc Millas , pgsql-performance@postgresql.org References: From: Andrew Dunstan Message-ID: Date: Fri, 21 May 2021 09:21:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/21/21 8:41 AM, Marc Millas wrote: > Hi, > > my POC in postgres 12.(important ?) > > if I setup 2 postgres clusters, and create a publication in one and a > subscription in the other, > and do on the pub an update which does not change the data (updating > an existing record with same data) then this (useless) update go > through replication.(ie consumes network ressource) > > what are ways to avoid this ? > (I thought of a trigger to not execute the useless update, but I > dont see how to do this) > any ideas ? > > thanks > PS: remarks about the meaning of this are off topic, thanks > > Postgres provides exactly such a trigger. See https://www.postgresql.org/docs/12/functions-trigger.html cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com