Re: New gist vacuum.

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: New gist vacuum.
Дата
Msg-id 8548498B-6EC6-4C89-8313-107BEC437489@yandex-team.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] New gist vacuum.  (Andrey Borodin <x4mmm@yandex-team.ru>)
Ответы Re: New gist vacuum.  (Andrey Borodin <x4mmm@yandex-team.ru>)
Список pgsql-hackers
Hi hackers!

Here is the patch that deletes pages during GiST VACUUM.

> 12 нояб. 2017 г., в 23:20, Andrey Borodin <x4mmm@yandex-team.ru> написал(а):
>
> If author and community do not object, I want to continue work on Konstantin's patch.


==Purpose==
Long story short, some time ago Konstantin Kuznetsov hacked out a patch that added GiST scan with physical order of
scan.
This scan is using a lot of memory to build map of whole GiST graph. If there is not enough maintenance memory, patch
hadthe fallback to old GiST VACUUM. 
New behavior was deleting pages while old (still used) was not.

I've rebased patch, fixed some bugs and decided that it solves too much in a single step.

Here is the patch, which adds functionality of GiST page deletes.
If this is committed, porting physical scan code will be much easier.

==What is changed==
When GiST VACUUM scans graph for removed tuples, it remembers internal pages that are referencing completely empty leaf
pages.
Then in additional step, these pages are rescanned to delete references and mark leaf pages as free.

==Limitations==
At least one reference on each internal pages is left undeleted to preserve balancing of the tree.
Pages that has FOLLOW-RIGHT flag also are not deleted, even if empty.


Thank you for your attention, any thoughts are welcome.

Best regards, Andrey Borodin.

Вложения

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

Предыдущее
От: Yugo Nagata
Дата:
Сообщение: Re: [HACKERS] [PATCH] Lockable views
Следующее
От: Андрей Жиденков
Дата:
Сообщение: Notes about Pl/PgSQL assignment performance