Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dN0KY-0007vy-4t for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Jun 2017 17:19:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dN0KX-0005ek-Kb for pgsql-bugs@arkaria.postgresql.org; Mon, 19 Jun 2017 17:19:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dN0KW-0005cz-PD for pgsql-bugs@postgresql.org; Mon, 19 Jun 2017 17:19:12 +0000 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dN0KT-0007sT-Ve for pgsql-bugs@postgresql.org; Mon, 19 Jun 2017 17:19:11 +0000 Received: by mail-qk0-x22c.google.com with SMTP id d14so38779831qkb.1 for ; Mon, 19 Jun 2017 10:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=kKhS2wkeW1hazBMPy/sTfYDUVkhskHvKe5ez8YzB5MM=; b=U9JXLMUOVYwTpya6dsB41CT0by9Tj2dxq39in2kkbH2DQAnfhEK5Qkuyq1x5Jcx4c5 otIRph6U7NKL7opNrzFRyJn/E4srfcAVS1srRfUDvIIMU4g62BsU0t626jQJS7eWnoVc a+su7lRSOOwhDpwiwb3C6jbf1tbSkL6MfP1vTkYA4TZ9VTt6fa79KEb2xPFcCKHC/XO6 vu+gduBE2jxXtAZ+U0Ox/uRPPxcnfhGx6AAk0kGC/ua4TNEmXxG9c2LZNbOrCOmE02BY E9JMrXpZGcceyC9ZBidtMxcsY6kkYZHWvREtu7DD2x1RE8ZuSWmIBC1vjvyXOAyvsL/j HMgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kKhS2wkeW1hazBMPy/sTfYDUVkhskHvKe5ez8YzB5MM=; b=Zza9V5z3i5P/mDN2YH2OmGIf0tfxU577Z6qhCoUR+S71Y9TUcUc3cN6jSPtYTrRKAN TtflZJTQa0D4NRV8ESzLFEyqYXsaUTfKxjaTOwi7N528RSeG6t+8R4g9fpG9Ul820Rqc vqdOUJG1RxcYRhbzWSZ1mn+fjKCDOqTuvJedwTUgNgRU29CoZ1fOgrUvYr6lC3z74YXX UzrxmuMp31CyavcN3jpeSPg+NbCji077jlroJSBjYrIoOdax+UXtRI6MENTt9aiwvd+2 l+uDv2lpJzJKsbzwtTPjZ1Mf5EhxwpqY4ypFMIXEoAjJQkhWB0b27fIiOVstlf5URifH /ptA== X-Gm-Message-State: AKS2vOyVJoDB6k1gp64gkavv38iJ/yVm2+DgzpCAN2a7wsScDBpPpADM iI62CJlowIYrkJ+2 X-Received: by 10.55.18.90 with SMTP id c87mr10940221qkh.174.1497892748805; Mon, 19 Jun 2017 10:19:08 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([179.57.115.10]) by smtp.gmail.com with ESMTPSA id b17sm7535475qte.33.2017.06.19.10.19.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Jun 2017 10:19:08 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 98CE8475; Mon, 19 Jun 2017 13:19:06 -0400 (-04) Date: Mon, 19 Jun 2017 13:19:06 -0400 From: Alvaro Herrera To: Tom Lane Cc: Robert Haas , Dilip Kumar , Artus de benque , Postgres-Bugs , pgsql-hackers Subject: Re: [HACKERS] Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger Message-ID: <20170619171906.4lvo4dozwuufpfiy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1742.1497889221@sss.pgh.pa.us> User-Agent: NeoMutt/20170306-137-4415bd-dirty (1.8.0) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Tom Lane wrote: > Robert Haas writes: > > On Mon, Jun 19, 2017 at 11:59 AM, Tom Lane wrote: > >> I don't think it's a bug, I think it's an intentional design tradeoff. > >> To suppress an update in this case, the trigger would have to grovel > >> through the individual fields and detoast them before comparing. > >> That would add a lot of cycles, and only seldom add successes. > >> > >> Possibly we should adjust the documentation so that it doesn't imply > >> that this trigger guarantees to suppress every no-op update. > > > That doesn't sound like a very plausible argument to me. I don't > > think that a proposal to add a function named > > sometimes_suppress_redundant_updates_trigger() would've attracted many > > votes. > > You'd be wrong. The entire point of this trigger is to save cycles, > so having it eat a lot of cycles only to fail is not an improvement. I suppose that either behavior may be desirable depending on circumstances. Maybe it is possible to have each installed trigger be configurable so that it can select either behavior. (Maybe use the trigger argument as a column list, and for each column in the list, do a full detoast and compare instead of relying on toast pointer equality). The current behavior seems more convenient in more cases, and so should remain the default. But this sounds like an additional feature, not a bug. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs