Gasper Zejn <zelo(dot)zejn(at)gmail(dot)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