Re: update behavior - Mailing list pgsql-admin

From Tom Lane
Subject Re: update behavior
Date
Msg-id 1461470.1750354537@sss.pgh.pa.us
Whole thread Raw
In response to update behavior  (Scott Ribe <scott_ribe@elevated-dev.com>)
List 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 by date:

Previous
From: Scott Ribe
Date:
Subject: Re: update behavior
Next
From: Scott Ribe
Date:
Subject: Re: update behavior