Re: [HACKERS] Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger

From: Artus de benque <artusdebenque(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger
Date: 2017-06-19 17:00:59
Message-ID: CAHhcnVRZxTMQd62o6nr0cxdEpgfjPnqGQZprjkYLWrYDWDNVng@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Hi,

It looks like you know what is happening, but I found that I have made an
error in my original assumption: (while the steps to reproduce are still
valid)

The size of the string at which the trigger does not work as expected
varies, depending on the size of the other fields in the row.

The 'limit size' is lower if I set bigger values in another text field in
the same row (and it seems that it is reached when going above 2000 octet
for the texts cells added up).

Sorry if this is noise, and thank you for looking into the bug (or
documentation error).

Regards,

Artus de Benque

Le lun. 19 juin 2017 à 18:20, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> a écrit :

> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> > On Mon, Jun 19, 2017 at 11:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.
>
> regards, tom lane
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2017-06-19 17:19:06 Re: [HACKERS] Postgresql bug report - unexpected behavior of suppress_redundant_updates_trigger
Previous Message Jeff Janes 2017-06-19 16:31:43 Re: BUG #14714: long running sessions from remote instance seems to hang some times

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2017-06-19 17:10:03 Re: Decimal64 and Decimal128
Previous Message Robert Haas 2017-06-19 17:00:39 Re: Decimal64 and Decimal128