Re: testing HS/SR - 1 vs 2 performance

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: testing HS/SR - 1 vs 2 performance
Дата
Msg-id 8919.1271428792@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: testing HS/SR - 1 vs 2 performance  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: testing HS/SR - 1 vs 2 performance
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> I didn't handle xid wraparound correctly in the binary search, need to use
> TransactionIdFollows instead of plan >.

I think you're outsmarting yourself there.  A binary search will in fact
*not work* with circular xid comparison (this is exactly why there's no
btree opclass for XID).  You need to use plain >, and make sure the
array you're searching is ordered that way too.  The other way might
accidentally fail to malfunction if you only tested ranges of XIDs that
weren't long enough to wrap around, but that doesn't make it right.
        regards, tom lane


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: testing HS/SR - 1 vs 2 performance
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: testing HS/SR - 1 vs 2 performance