Re: B-Tree support function number 3 (strxfrm() optimization)

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: B-Tree support function number 3 (strxfrm() optimization)
Дата
Msg-id 87h9vklbgp.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: B-Tree support function number 3 (strxfrm() optimization)  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
>>>>> "Peter" == Peter Geoghegan <pg@heroku.com> writes:
Peter> You'll probably prefer the attached. This patch works byPeter> disabling abbreviation, but only after writing
outruns, withPeter> the final merge left to go. That way, it doesn't matter whenPeter> abbreviated keys are not read
backfrom disk (or regenerated).
 

This seems tolerable to me for a quick fix. The merits of storing the
abbreviation vs. re-abbreviating on input can be studied later.
Peter> I believe this bug was missed because it only occurs when therePeter> are multiple runs, and not in the common
casewhere there is onePeter> big initial run that is found already sorted when we reachPeter> mergeruns().
 

Ah, yes, there is an optimization for the one-run case which bypasses
all further comparisons, hiding the problem.

-- 
Andrew (irc:RhodiumToad)



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Error check always bypassed in tablefunc.c
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Dereferenced pointers checked as NULL in btree_utils_var.c