On 2013-07-01 17:46:51 -0400, Robert Haas wrote:
> But backing up a minute, this is really a significant behavior change
> that is independent of the purpose of the rest of this patch. What
> you're proposing here is that every time we consider toasting a value
> on update, we should first check whether it's byte-for-byte equivalent
> to the old value. That may or may not be a good idea - it will suck
> if, for example, a user repeatedly updates a very long string by
> changing only the last character thereof, but it will win in other
> cases.
In that case the old value will rather likely just have been read just
before, so the price of rereading should be relatively low.
But:
> Whether it's a good idea or not, I think it deserves to be a
> separate patch. For purposes of this patch, I think you should just
> assume that any external-indirect value needs to be retoasted, just as
> we currently assume for untoasted values.
is a rather valid point. I've split the patch accordingly. The second
patch is *not* supposed to be applied together with patch 1 but rather
included for reference.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services