Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates
Дата
Msg-id 43786.1599673130@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates  (PG Bug reporting form <noreply@postgresql.org>)
Ответы Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates  (Stephane Desnault <stephane.desnault@gmail.com>)
Список pgsql-bugs
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



В списке pgsql-bugs по дате отправления:

Предыдущее
От: PG Bug reporting form
Дата:
Сообщение: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates
Следующее
От: Stephane Desnault
Дата:
Сообщение: Re: BUG #16613: Built in suppress_redundant_updates_trigger() trigger not supressing redundant updates