Re: Proposal for CSN based snapshots

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Proposal for CSN based snapshots
Дата
Msg-id CAPpHfduAjOF=Ynif0Z5cfN0vBgHUybgahQLAp1bz5Xc86KFfSQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal for CSN based snapshots  (Heikki Linnakangas <hlinnaka@iki.fi>)
Список pgsql-hackers
On Wed, Aug 10, 2016 at 2:10 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
Yeah, if the csnlog access turns out to be too expensive, we could do something like this. In theory, you can always convert a CSN snapshot into an old-style list of XIDs, by scanning the csnlog between the xmin and xmax. That could be expensive if the distance between xmin and xmax is large, of course. But as you said, you can have various hybrid forms, where you use a list of XIDs of some range as a cache, for example.

I'm hopeful that we can simply make the csnlog access fast enough, though. Looking up an XID in a sorted array is O(log n), while looking up an XID in the csnlog is O(1). That ignores all locking and different constant factors, of course, but it's not a given that accessing the csnlog has to be slower than a binary search of an XID array.

FYI, I'm still fan of idea to rewrite XID with CSN in tuple in the same way we're writing hint bits now.
I'm going to make prototype of this approach which would be enough for performance measurements.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Curing plpgsql's memory leaks for statement-lifespan values
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Proposal for CSN based snapshots