ZEUGSWETTER Andreas IZ5 wrote:
>
> > The main problem is just programistic: you will have to add
> > heap tid to the end of index tuples on internal index pages,
> > but on leaf pages heap tid is in the begin of index tuples
> > (inside of btitem struct).
> >
> While I absolutely like the idea of having the heap tid in the index,
> I don't quite agree, that leaf pages need heap tid at the front of the key.
Oh no - this is not what I meant to say.
First, there is no heap tid in index tuples in internal pages,
and so we'll have to add it to them. Actually, it doesn't matter
where to add it - just after btitem->bti_itup (i.e. header of
index tuple) or after field keys - it will be the last key used
in comparing.
But on leaf pages index tuples already keep heap tid - this is
btitem->bti_itup.t_tid - and so we shouldn't add heap tid there.
I just wanted to say that we'll have to differentiate
internal/leaf index tuples in _bt_compare, _bt_binsrch etc
to know from what part of index tuples heap tid should be fetched.
Sorry.
Vadim