Re: B-tree parent pointer and checkpoints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: B-tree parent pointer and checkpoints
Дата
Msg-id 18661.1289500486@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: B-tree parent pointer and checkpoints  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: B-tree parent pointer and checkpoints  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Hmm, we don't currently keep track of that when we descend the tree to 
> choose the target page, but perhaps an extra Consistent call to check 
> that would be acceptable. We already call Penalty for every tuple on 
> each internal node on the way, so compared to that one more call should 
> not be too expensive. If we do that, I think it would simplify the 
> algorithm quite a bit to just update all the parents on the way down, 
> instead of traversing up from the bottom after inserting the tuple to 
> the leaf.

Oh, that's a really good idea, I think.  But what about page splits?
I guess in the case of a split, you'd be replacing the parent entry
anyway, so having previously updated it to something larger doesn't
really cause a problem other than wasting a few cycles --- which are
probably still less than you save by not having to traverse back up.

If we supported UNIQUE GIST indexes then you could criticize this plan
on the grounds that parent entries would get uselessly enlarged before
detecting a uniqueness failure; but we don't and I know of no plans to.
So on the whole I think it sounds good.  Teodor, what do you think?
        regards, tom lane


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

Предыдущее
От: Nicolas Barbier
Дата:
Сообщение: Re: MULTISET and additional functions for ARRAY
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: MULTISET and additional functions for ARRAY