Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather

From: Christopher Kline <kline(dot)christopher(at)gmail(dot)com>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Date: 2024-02-15 16:29:32
Message-ID: CAArmHzSFsTQ3bPX31zDHYSMz_PiHostGKPBp7qM+WU0uz3g6OQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you all for the clarification. I like David Johnston's suggestion of

# capped at max_parallel_workers

That clearly defines the constraint.

On Thu, Feb 15, 2024 at 11:10 AM David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Thu, Feb 15, 2024 at 8:55 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
>> > In the default postgresql.conf that is generated, there are the
>> following
>> > lines:
>>
>> > #max_worker_processes = 8 # (change requires restart)
>> > #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers
>> > <<<<<<<<<<<<<<<<<<<<<<<< THIS
>> > #max_parallel_maintenance_workers = 2 # taken from max_parallel_workers
>> > max_parallel_workers = 8 # maximum number of
>> max_worker_processes that
>> > # can be used in parallel
>> operations
>>
>> > it indicates that the default value is taken from whatever
>> > max_parallel_workers is.
>>
>> No, you're misreading it. There's no magic connection between these
>> two settings. What the comment means to say is that the per-gather
>> worker processes come out of a pool of at most max_parallel_workers
>> processes. Perhaps another wording would be better, but we don't have
>> a lot of space here --- any thoughts?
>>
>> max_parallel workers = 8 # allocated from max_worker_processes
>
> max_parallel_*_workers = N # allocated from max_parallel_workers
>
> or maybe "consumed from ..."
>
> Or
>
> max_parallel_*_workers = N # capped at max_parallel_workers
>
> The last one turns a process-oriented description into a constraint, the
> latter seems to fit better in a config file.
>
> David J.
>
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-02-15 17:31:33 Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Previous Message Tom Lane 2024-02-15 16:28:23 Re: BUG #18344: Pruning tables partitioned by bool range fails with invalid strategy