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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: parallel vacuum - few questions on docs, comments and code
Дата
Msg-id CAA4eK1+zJ5XJ7tzCQADTvBg2UPZa=ucnuh8sQ-M0_708Ji4nQA@mail.gmail.com
обсуждение исходный текст
Ответ на parallel vacuum - few questions on docs, comments and code  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: parallel vacuum - few questions on docs, comments and code  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Tue, May 11, 2021 at 5:38 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> I was going through the parallel vacuum docs and code. I found below
> things, please someone clarify:
>
> 1) I see that  a term "parallel degree" is used in the docs, code
> comments, error messages "parallel vacuum degree must be a
> non-negative integer", "parallel vacuum degree must be between 0 and
> %d". Is there any specific reason to use the term "parallel degree"?
> In the docs and code comments we generally use "parallel workers".
>

The parallel degree term is used here to indicate that we compute how
much parallelism we can achieve based on the indexes.

> 2) The error messages "parallel vacuum degree must be between 0 and
> %d" and "parallel option requires a value between 0 and %d" look
> inconsistent.
>

I think we can make them consistent.

> 5) Can the parallel_workers in below condition ever be negative in
> begin_parallel_vacuum? I think we can just have if (parallel_workers
> == 0).
>     /* Can't perform vacuum in parallel */
>     if (parallel_workers <= 0)

Even if it can't go negative in the current code, I don't see a
problem with the current code. It seems safe like this.

> 6) I think, instead of saying "using integer background workers", we
> can just say "using specified or lesser number of background workers".
> From the docs: Perform index vacuum and index cleanup phases of VACUUM
> in parallel using integer background workers
> We can say "workers specified will be used during execution"
> From the docs: workers specified in integer will be used during execution
>

The docs here refer to "PARALLEL integer" specified in specs, so not
sure if the proposed text is better.

-- 
With Regards,
Amit Kapila.



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

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: [Patch] ALTER SYSTEM READ ONLY
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: compute_query_id and pg_stat_statements