Re: Proposal for UPDATE: do not insert new tuple on heap if update does not change data - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal for UPDATE: do not insert new tuple on heap if update does not change data
Date
Msg-id 1368.1453304051@sss.pgh.pa.us
Whole thread Raw
In response to Proposal for UPDATE: do not insert new tuple on heap if update does not change data  (Gasper Zejn <zelo.zejn@gmail.com>)
List pgsql-hackers
Gasper Zejn <zelo.zejn@gmail.com> writes:
> I was wondering if PostgreSQL adds new tuple if data is not changed
> when using UPDATE. It turns out it does add them and I think it might
> be beneficial not to add a new tuple in this case, since it causes a
> great deal of maintenance: updating indexes, vacuuming table and
> index, also heap fragmentation.

This has been discussed in the past, and the conclusion was that expending
cycles on every UPDATE to check for this case would be a net loss.  How
many real applications do no-op updates often enough that it's worth
optimizing for?
        regards, tom lane



pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Set search_path + server-prepared statements = cached plan must not change result type
Next
From: Andres Freund
Date:
Subject: Re: checkpointer continuous flushing