public inbox for [email protected]
help / color / mirror / Atom feedFrom: David G. Johnston <[email protected]>
To: Scott Ribe <[email protected]>
Cc: Pgsql-admin <[email protected]>
Subject: Re: update behavior
Date: Thu, 19 Jun 2025 10:31:59 -0700
Message-ID: <CAKFQuwbwAbbk6KUKXyX2VxpX3aUDhS5Zd__2JKQXdhH5zHaB4g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
On Thu, Jun 19, 2025 at 10:24 AM Scott Ribe <[email protected]>
wrote:
> I believe that if I UPDATE a row with the same values that it already has,
> this still dirties pages, writes the row, generates a WAL entry. There is
> no shortcut in the processing that's "hey, there's not really a change
> here, we'll just leave storage alone".
>
> Is this correct?
>
>
Correct. You need a trigger to prevent the update. There is one provided:
suppress_redundant_updates_trigger()
https://www.postgresql.org/docs/17/functions-trigger.html
David J.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: update behavior
In-Reply-To: <CAKFQuwbwAbbk6KUKXyX2VxpX3aUDhS5Zd__2JKQXdhH5zHaB4g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox