Andres Freund <andres@anarazel.de> writes:
> On 2016-05-10 18:29:59 -0400, Tom Lane wrote:
>> Having said that, I still say that changing HeapTupleSatisfiesToast
>> is the wrong thing. It can't go deciding not to return toast values
>> because they're committed dead --- the parent tuple could easily be
>> committed dead as well, and yet still be visible to our query's
>> snapshot.
> Hm. Shouldn't a mvcc snapshot be able to differentiate between those
> cases?
HeapTupleSatisfiesToast doesn't have one. And changing things so that
toast tuples are checked using MVCC rules is the wrong thing anyway,
because it would require adding hint-bit update traffic for toast
tables.
> When are we looking up toast tuple that's *not* visible to the
> current snapshot?
Once again, it's the parent tuple where we should be doing the
visibility check; noplace else.
regards, tom lane