Re: update with no changes - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: update with no changes
Date
Msg-id CAKFQuwbxNfRB0qSrp_Tjb0hZxXiozHMPdvY585GpsUWtrSu6xA@mail.gmail.com
Whole thread Raw
In response to update with no changes  (Marcos Pegoraro <marcos@f10.com.br>)
Responses Re: update with no changes
List pgsql-hackers
On Fri, Nov 19, 2021 at 9:38 AM Marcos Pegoraro <marcos@f10.com.br> wrote:
If nothing was changed, why create a new record, append data to wal, set old record as deleted, etc, etc ?

Because it takes resources to determine that nothing changed.  If you want to opt-in into that there is even an extension trigger that makes doing so fairly simple.  But it's off by default because the typical case is that people don't frequently perform no-op updates so why eat the expense.

David J.

pgsql-hackers by date:

Previous
From: Bharath Rupireddy
Date:
Subject: Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?
Next
From: Andres Freund
Date:
Subject: Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)