Re: parallel vacuum - few questions on docs, comments and code

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: parallel vacuum - few questions on docs, comments and code
Дата
Msg-id CALj2ACX_eP4m5Qc_0hVuwRgmOiMkKiyoPeFx=RB6JgirujbA6A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: parallel vacuum - few questions on docs, comments and code  (Justin Pryzby <pryzby@telsasoft.com>)
Список pgsql-hackers
On Tue, May 11, 2021 at 6:31 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> > 4) IIUC, below comment says that even if PARALLEL 0 is specified with
> > VACUUM command, there are chances that the indexes are vacuumed in
> > parallel. Isn't it a bit unusual that a user specified 0 workers but
> > still the system is picking up parallelism? I'm sure this would have
> > been discussed, but I'm curious to know the reason.
> >  * nrequested is the number of parallel workers that user requested.  If
> >  * nrequested is 0, we compute the parallel degree based on nindexes, that is
> >  * the number of indexes that support parallel vacuum.
>
> No - nrequested is not actually the number of workers requested - it seems like
> a poor choice of name.
>
> This is the key part:
>
> src/include/commands/vacuum.h
>          * The number of parallel vacuum workers.  0 by default which means choose
>          * based on the number of indexes.  -1 indicates parallel vacuum is
>          * disabled.
>          */
>         int                     nworkers;
> } VacuumParams;

Thanks. The name "nworkers" looks fine to me after reading the comment
above it.  And the parallelism will be chosen by default.
    /* By default parallel vacuum is enabled */
    params.nworkers = 0;

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Do we need to rethink how to parallelize regression tests to speedup CLOBBER_CACHE_ALWAYS?
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: parallel vacuum - few questions on docs, comments and code