I wrote:
> This method is utterly, utterly unacceptable; you're probably trashing
> the contents of a disk buffer there.
... however, it seems reasonable to assume that the *new* tuple is just
local storage. Why don't you just poke the old tuple's OID into the new
one before comparing?
regards, tom lane