Re: [HACKERS] Bizarre coding in _bt_binsrch

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Bizarre coding in _bt_binsrch
Дата
Msg-id 375B9CB8.23725C88@krs.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Bizarre coding in _bt_binsrch  (ZEUGSWETTER Andreas IZ5 <Andreas.Zeugswetter@telecom.at>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: ZEUGSWETTER Andreas IZ5
Дата:
Сообщение: Re: [HACKERS] Priorities for 6.6
Следующее
От: Vadim Mikheev
Дата:
Сообщение: Re: [HACKERS] Bizarre coding in _bt_binsrch