Re: [HACKERS] Bizarre coding in _bt_binsrch

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: ZEUGSWETTER Andreas IZ5 <Andreas(dot)Zeugswetter(at)telecom(dot)at>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Bizarre coding in _bt_binsrch
Date: 1999-06-07 10:19:36
Message-ID: 375B9CB8.23725C88@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-06-07 10:23:09 Re: [HACKERS] Bizarre coding in _bt_binsrch
Previous Message ZEUGSWETTER Andreas IZ5 1999-06-07 10:11:49 Re: [HACKERS] Priorities for 6.6