Re: WIP: parallel GiST index builds

Поиск
Список
Период
Сортировка
От Andrey M. Borodin
Тема Re: WIP: parallel GiST index builds
Дата
Msg-id BC901E8E-8959-4FE7-A167-6F8E51C0D9D6@yandex-team.ru
обсуждение исходный текст
Ответ на WIP: parallel GiST index builds  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Ответы Re: WIP: parallel GiST index builds
Список pgsql-hackers
Hi Tomas!

> On 7 Jun 2024, at 20:41, Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:
>
> After looking into parallel builds for BRIN and GIN indexes, I was
> wondering if there's a way to do parallel builds for GiST too. I knew
> next to nothing about how GiST works, but I gave it a shot and here's
> what I have - the attached patch allows parallel GiST builds for the
> "unsorted" case (i.e. when the opclass does not include sortsupport),
> and does not support buffered builds.

I think this totally makes sense. I've took a look into tuples partitioning (for sorted build) in your Github and I see
thatit's complicated feature. So, probably, we can do it later. 
I'm trying to review the patch as it is now. Currently I have some questions about code.

1. Do I get it right that is_parallel argument for gistGetFakeLSN() is only needed for assertion? And this assertion
canbe ensured just by inspecting code. Is it really necessary? 
2. gistBuildParallelCallback() updates indtuplesSize, but it seems to be not used anywhere. AFAIK it's only needed to
bufferedbuild. 
3. I think we need a test that reliably triggers parallel and serial builds.

As far as I know, there's a well known trick to build better GiST over PostGIS data: randomize input. I think parallel
scanis just what is needed, it will shuffle tuples enough... 

Thanks for working on this!


Best regards, Andrey Borodin.


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: xid_wraparound tests intermittent failure.
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: xid_wraparound tests intermittent failure.