pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: stephane.desnault@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates
Date: Wed, 09 Sep 2020 13:38:50 -0400
Message-ID: <43786.1599673130@sss.pgh.pa.us> (raw)
In-Reply-To: <16613-d5d1f061f4d595d3@postgresql.org>
References: <16613-d5d1f061f4d595d3@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> The built-in suppress_redundant_updates_trigger() trigger is not supressing
> redundant updates after an ALTER TABLE ... ADD COLUMN...

This doesn't seem like a bug.  The trigger code is looking for bitwise
equality between new tuple and old tuple, which it won't find because
the new tuple will have a larger number-of-attributes field; not to
mention a possibly-wider nulls bitmap.

Sure, we could complicate the trigger to try to understand such cases,
but that would likely make things net slower in most applications.
The hard part of having such a trigger is that it's pure overhead
for real updates, so that overhead has to be minimized.

Possibly the documentation could be clarified.  What it says now is
"prevent any update that does not actually change the data in the
row from taking place", which is pretty vague about what the criteria
really are.  Not sure about better wording though.

			regards, tom lane





view thread (3+ messages)  latest in thread

Message-ID: <43786.1599673130@sss.pgh.pa.us>
Permalink:  ../43786.1599673130@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/43786.1599673130@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, stephane.desnault@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates
  In-Reply-To: <43786.1599673130@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox