Re: Max size of a btree index entry

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Max size of a btree index entry
Дата
Msg-id 16470.1153347824@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Max size of a btree index entry  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: Max size of a btree index entry  ("Jim C. Nasby" <jnasby@pervasive.com>)
Список pgsql-hackers
"Jim C. Nasby" <jnasby@pervasive.com> writes:
> On Tue, Jul 11, 2006 at 10:02:49AM -0400, Tom Lane wrote:
>> 1. In a non-rightmost page, we need to include a "high key", or page
>> boundary key, that isn't one of the useful data keys.
> Why does a leaf page need a boundary key?

So you can tell whether a proposed insertion ought to go into this page,
or the one to its right.  The tree descent logic doesn't guarantee that
you descend to exactly the correct page --- if concurrent page splits
are going on, you might have to "move right" one or more times after
reaching the leaf level.  You need the boundary key to make this test
correctly.

And of course, the reason there's no high key on the rightmost page is
exactly that it has no right-hand neighbor, hence no upper limit on its
delegated key space.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgxs problem
Следующее
От: "Gregory Maxwell"
Дата:
Сообщение: Re: How does the planner deal with multiple possible indexes?