Re: update behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: update behavior
Дата
Msg-id 1461470.1750354537@sss.pgh.pa.us
обсуждение исходный текст
Ответ на update behavior  (Scott Ribe <scott_ribe@elevated-dev.com>)
Список pgsql-admin
Scott Ribe <scott_ribe@elevated-dev.com> writes:
> I believe that if I UPDATE a row with the same values that it already has, this still dirties pages, writes the row,
generatesa WAL entry. There is no shortcut in the processing that's "hey, there's not really a change here, we'll just
leavestorage alone". 

> Is this correct?

It is.  We do offer a trigger you can add to suppress zero-change
updates [1], but that's not the default behavior.  We judged that
checking for that would add more cycles than it removes, for most
applications most of the time.

            regards, tom lane

[1] https://www.postgresql.org/docs/current/functions-trigger.html



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