Thread
Commits
-
Doc: improve a couple of comments in postgresql.conf.sample.
- ed1b0ade703a 15.7 landed
- 88cbdcafdb74 12.19 landed
- 6686e9676c8f 14.12 landed
- 5c9f2f9398b4 17.0 landed
- 1a6dcfecab9f 16.3 landed
- 150ac3695f31 13.15 landed
-
BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
The Post Office <noreply@postgresql.org> — 2024-02-14T22:11:14Z
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.
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Tom Lane <tgl@sss.pgh.pa.us> — 2024-02-15T15:55:10Z
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
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
David G. Johnston <david.g.johnston@gmail.com> — 2024-02-15T16:10:00Z
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.
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Christopher Kline <kline.christopher@gmail.com> — 2024-02-15T16:29:32Z
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. > >
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Tom Lane <tgl@sss.pgh.pa.us> — 2024-02-15T17:31:33Z
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
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
David G. Johnston <david.g.johnston@gmail.com> — 2024-02-15T19:41:59Z
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.
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Christopher Kline <kline.christopher@gmail.com> — 2024-02-15T20:29:06Z
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. >
-
Re: BUG #18343: Incorrect description in postgresql.conf for max_parallel_workers_per_gather
Tom Lane <tgl@sss.pgh.pa.us> — 2024-02-15T21:30:39Z
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