pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
8+ messages / 4 participants
[nested] [flat]
* BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-14 22:11 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 8+ messages in thread
From: PG Bug reporting form @ 2024-02-14 22:11 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: kline.christopher@gmail.com
The following bug has been logged on the website:
Bug reference: 18343
Logged by: Christopher Kline
Email address: kline.christopher@gmail.com
PostgreSQL version: 14.11
Operating system: Windows 10 x64
Description:
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. However, if I start postgresql with those settings
and issue a query of
SELECT setting, unit FROM pg_settings WHERE name =
'max_parallel_workers_per_gather'
the result I get is '2', not '8'.
This leads me to believe that either there is a bug in the code that's not
setting the correct default, or the comment in postgresql.conf is incorrect.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 15:55 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2024-02-15 15:55 UTC (permalink / raw)
To: kline.christopher@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.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?
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 16:10 David G. Johnston <david.g.johnston@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2024-02-15 16:10 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: kline.christopher@gmail.com; pgsql-bugs@lists.postgresql.org
On Thu, Feb 15, 2024 at 8:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> PG Bug reporting form <noreply@postgresql.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.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 16:29 Christopher Kline <kline.christopher@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Christopher Kline @ 2024-02-15 16:29 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org
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.g.johnston@gmail.com> wrote:
> On Thu, Feb 15, 2024 at 8:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> PG Bug reporting form <noreply@postgresql.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.
>
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 17:31 Tom Lane <tgl@sss.pgh.pa.us>
parent: Christopher Kline <kline.christopher@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Tom Lane @ 2024-02-15 17:31 UTC (permalink / raw)
To: Christopher Kline <kline.christopher@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs@lists.postgresql.org
Christopher Kline <kline.christopher@gmail.com> writes:
> Thank you all for the clarification. I like David Johnston's suggestion of
> # capped at max_parallel_workers
> That clearly defines the constraint.
I was thinking perhaps "# limited by max_parallel_workers"
or something like that. "Capped at" isn't phraseology we
use elsewhere.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 19:41 David G. Johnston <david.g.johnston@gmail.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 8+ messages in thread
From: David G. Johnston @ 2024-02-15 19:41 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Christopher Kline <kline.christopher@gmail.com>; pgsql-bugs@lists.postgresql.org
On Thu, Feb 15, 2024 at 10:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Christopher Kline <kline.christopher@gmail.com> writes:
> > Thank you all for the clarification. I like David Johnston's suggestion
> of
> > # capped at max_parallel_workers
> > That clearly defines the constraint.
>
> I was thinking perhaps "# limited by max_parallel_workers"
> or something like that. "Capped at" isn't phraseology we
> use elsewhere.
>
>
"limited by" is indeed better IMO as well.
David J.
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 20:29 Christopher Kline <kline.christopher@gmail.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Christopher Kline @ 2024-02-15 20:29 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-bugs@lists.postgresql.org
Agreed.
On Thu, Feb 15, 2024 at 2:42 PM David G. Johnston <
david.g.johnston@gmail.com> wrote:
> On Thu, Feb 15, 2024 at 10:31 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> Christopher Kline <kline.christopher@gmail.com> writes:
>> > Thank you all for the clarification. I like David Johnston's suggestion
>> of
>> > # capped at max_parallel_workers
>> > That clearly defines the constraint.
>>
>> I was thinking perhaps "# limited by max_parallel_workers"
>> or something like that. "Capped at" isn't phraseology we
>> use elsewhere.
>>
>>
> "limited by" is indeed better IMO as well.
>
> David J.
>
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
@ 2024-02-15 21:30 Tom Lane <tgl@sss.pgh.pa.us>
parent: Christopher Kline <kline.christopher@gmail.com>
0 siblings, 0 replies; 8+ messages in thread
From: Tom Lane @ 2024-02-15 21:30 UTC (permalink / raw)
To: Christopher Kline <kline.christopher@gmail.com>; +Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-bugs@lists.postgresql.org
Christopher Kline <kline.christopher@gmail.com> writes:
> On Thu, Feb 15, 2024 at 2:42 PM David G. Johnston <
> david.g.johnston@gmail.com> wrote:
>> "limited by" is indeed better IMO as well.
> Agreed.
Sold, I'll make it so.
regards, tom lane
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2024-02-15 21:30 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-02-14 22:11 BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather PG Bug reporting form <noreply@postgresql.org>
2024-02-15 15:55 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-02-15 16:10 ` David G. Johnston <david.g.johnston@gmail.com>
2024-02-15 16:29 ` Christopher Kline <kline.christopher@gmail.com>
2024-02-15 17:31 ` Tom Lane <tgl@sss.pgh.pa.us>
2024-02-15 19:41 ` David G. Johnston <david.g.johnston@gmail.com>
2024-02-15 20:29 ` Christopher Kline <kline.christopher@gmail.com>
2024-02-15 21:30 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox