Re: minimal update - Mailing list pgsql-hackers

From Tom Lane
Subject Re: minimal update
Date
Msg-id 24321.1194534461@sss.pgh.pa.us
Whole thread Raw
In response to Re: minimal update  (Michael Glaesemann <grzm@seespotcode.net>)
Responses Re: minimal update  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Michael Glaesemann <grzm@seespotcode.net> writes:
> What would be the disadvantages of always doing this, i.e., just  
> making this part of the normal update path in the backend?

(1) cycles wasted to no purpose in the vast majority of cases.

(2) visibly inconsistent behavior for apps that pay attention
to ctid/xmin/etc.

(3) visibly inconsistent behavior for apps that have AFTER triggers.

There's enough other overhead in issuing an update (network,
parsing/planning/etc) that a sanely coded application should try
to avoid issuing no-op updates anyway.  The proposed trigger is
just a band-aid IMHO.

I think having it as an optional trigger is a reasonable compromise.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: A small rant about coding style for backend functions
Next
From: Bruce Momjian
Date:
Subject: Re: A small rant about coding style for backend functions