Re: [HACKERS] Block level parallel vacuum

Поиск
Список
Период
Сортировка
От Mahendra Singh Thalor
Тема Re: [HACKERS] Block level parallel vacuum
Дата
Msg-id CAKYtNAqY4sXPOau=NeBtsUX3UMn4cndi7_4Q9jH_MBDboaAhzQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: [HACKERS] Block level parallel vacuum  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Sat, 4 Jan 2020 at 07:12, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Fri, Jan 3, 2020 at 10:15 PM Robert Haas <robertmhaas@gmail.com> wrote:
> >
> > On Sun, Dec 29, 2019 at 4:23 PM Tomas Vondra
> > <tomas.vondra@2ndquadrant.com> wrote:
> > > IMO there's not much reason for the leader not to participate. For
> > > regular queries the leader may be doing useful stuff (essentially
> > > running the non-parallel part of the query) but AFAIK for VAUCUM that's
> > > not the case and the worker is not doing anything.
> >
> > I agree, and said the same thing in
> > http://postgr.es/m/CA+Tgmob7JLrngeHz6i60_TqdvE1YBcvGYVoEQ6_xvP=vN7DwGg@mail.gmail.com
> >
> > I really don't know why we have that code.
> >
>
> We have removed that code from the main patch.  It is in a separate
> patch and used mainly for development testing where we want to
> debug/test the worker code.
>

Hi All,

In other thread "parallel vacuum options/syntax" [1], Amit Kapila asked opinion about syntax for making normal vacuum to parallel.  From that thread, I can see that people are in favor of option(b) to implement.  So I tried to implement option(b) on the top of v41 patch set and implemented a delta patch.

How vacuum will work?

If user gave "vacuum" or "vacuum table_name", then based on the number of parallel supported indexes, we will launch workers.
Ex: vacuum table_name;
or vacuum (parallel) table_name;    //both are same.

If user has requested parallel degree (1-1024), then we will launch workers based on requested degree and parallel supported  indexes.
Ex: vacuum (parallel 8) table_name;

If user don't want parallel vacuum, then he should set parallel degree as zero.
Ex: vacuum (parallel 0) table_name;

I did some testing also and didn't find any issue after forcing normal vacuum to parallel vacuum.  All the test cases are passing and make check world also passing.

Here, I am attaching delta patch that can be applied on the top of v41 patch set. Apart from delta patch, attaching gist index patch (v4) and all the v41 patch set.

Please let me know your thoughts for this.

[1] : https://www.postgresql.org/message-id/CAA4eK1LBUfVQu7jCfL20MAF%2BRzUssP06mcBEcSZb8XktD7X1BA%40mail.gmail.com

--
Thanks and Regards
Mahendra Singh Thalor

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Refactor parse analysis of EXECUTE command
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: Errors when update a view with conditional-INSTEAD rules