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

The Post Office <noreply@postgresql.org>

From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kline.christopher@gmail.com
Date: 2024-02-14T22:11:14Z
Lists: pgsql-bugs
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.

Commits

  1. Doc: improve a couple of comments in postgresql.conf.sample.