Re: Assumptions about the number of parallel workers

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Assumptions about the number of parallel workers
Дата
Msg-id 20200207182843.p2eijgvo4zuvxa32@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Assumptions about the number of parallel workers  (Antonin Houska <ah@cybertec.at>)
Список pgsql-hackers
Hi,

On 2020-02-07 09:44:34 +0100, Antonin Houska wrote:
> Those Gather nodes still have non-zero num_workers, see this part of
> standard_planner:
> 
>     if (force_parallel_mode != FORCE_PARALLEL_OFF && top_plan->parallel_safe)
>     {
>     ...
>         gather->num_workers = 1;
>     gather->single_copy = true;

Ick. Looks like you might be right...


> Also, if it num_workers was zero for any reason, my patch would probably make
> regression tests fail. However I haven't noticed any assertion failure.

That however, is not at all guaranteed. The regression tests don't run
(or at least not much) with force_parallel_mode set. You can try
yourself though, with something like

PGOPTIONS='-c force_parallel_mode=regress' make check

Greetings,

Andres Freund



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Internal key management system
Следующее
От: Andres Freund
Дата:
Сообщение: Re: logical decoding : exceeded maxAllocatedDescs for .spill files