Re: Minmax indexes

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Minmax indexes
Дата
Msg-id 53E4E6DA.7070804@vmware.com
обсуждение исходный текст
Ответ на Re: Minmax indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: Minmax indexes  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Minmax indexes  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Minmax indexes  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
I couldn't resist starting to hack on this, and implemented the scheme
I've been having in mind:

1. MMTuple contains the block number of the heap page (range) that the
tuple represents. Vacuum is no longer needed to clean up old tuples;
when an index tuples is updated, the old tuple is deleted atomically
with the insertion of a new tuple and updating the revmap, so no garbage
is left behind.

2. LockTuple is gone. When following the pointer from revmap to MMTuple,
the block number is used to check that you land on the right tuple. If
not, the search is started over, looking at the revmap again.

I'm sure this still needs some cleanup, but here's the patch, based on
your v14. Now that I know what this approach looks like, I still like it
much better. The insert and update code is somewhat more complicated,
because you have to be careful to lock the old page, new page, and
revmap page in the right order. But it's not too bad, and it gets rid of
all the complexity in vacuum.

- Heikki


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: jsonb format is pessimal for toast compression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: jsonb format is pessimal for toast compression