Greg Stark <stark@mit.edu> writes:
> For the user visible ctid we could just arbitrarily declare that the ctid
> returned by an IOS is the head of the HOT update chain instead of the tail.
No, I don't think that'd work at all, because that tuple might be dead.
A minimum expectation is that "SELECT ... WHERE ctid = 'xxx'" would return
the same data as the IOS, and that would fail because it wouldn't return
anything.
(In principle I suppose we could *also* redefine what selecting by ctid
means. Doubt I want to go there though.)
> For a data modifying query -- and it would have to be one targeting some
> other table or else there's no way it could be an IOS -- does having a ctid
> for the head rather than the tail still work?
If you target a tuple that is live according to your current snapshot,
but nonetheless out-of-date, EPQ will chase up to the head for you.
But you gotta start with a tuple that is visible to your snapshot.
regards, tom lane