The order of postgresql.conf parameters is potentially confusing. Very minor cosmetic bug or "niggle"!

From: Pól Ua Laoínecháin <linehanp(at)tcd(dot)ie>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: The order of postgresql.conf parameters is potentially confusing. Very minor cosmetic bug or "niggle"!
Date: 2021-09-01 16:11:08
Message-ID: CAF4RT5QhSpxFYtM-nPCgrnwf+t=ExvzH8OWEP27=B8QPXs7FGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

OS: Linux (Fedora 34)
PostgreSQL from: source code
Versions affected: 12.7, 13,2 & 14 Beta3

Hi,

I used pgtune to configure my system and received the following
recommendations: (most have been snipped for brevity):

...
...
min_wal_size = 1GB
max_wal_size = 4GB
...
max_worker_processes = 2
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
max_parallel_maintenance_workers = 1
...

Now, I was going through my postgresql.conf file in accordance with
the recommendations and was changing the min_wal_size and max_wal_size
parameters.

However, in the .conf, the max_wal_size comes *_before_* the
min_wal_size and I nearly inverted my changes - i.e. setting the min
recommendation to the max one and vice versa.

Hardly a major issue, but in my opinion, it is *_totally_* illogical
to have the max_wal_size on the line above the min_wal_size. I propose
that this should be changed!

Also, with the max....workers... parameters

The untouched .conf file is as follows:

#max_worker_processes = 8 # (change requires restart)
#max_parallel_maintenance_workers = 2 # taken from max_parallel_workers
#max_parallel_workers_per_gather = 2 # taken from max_parallel_workers
#parallel_leader_participation = on
#max_parallel_workers = 8 # maximum number of
max_worker_processes that
# can be used in parallel operations

Now, max_worker_processes = 8 is fine, BUT, both the

max_parallel_maintenance_workers

and the

max_parallel_workers_per_gather

parameters depend on the max_parallel_workers parameter.

Surely then, the max_parallel_workers parameter should appear before
the two others which depend on it?

I realise that these are not show-stoppers but at least in the case of
the max_wal_ and min_wal_ size parameters, the inversion is a source
of cognitive dissonance which a simple swapping of their respective
positions would solve.

Should you require any further information, please don't hesitate to contact mej

Best regards,

Pól Ua Laoínecháin...

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2021-09-01 16:35:54 Re: The order of postgresql.conf parameters is potentially confusing. Very minor cosmetic bug or "niggle"!
Previous Message PG Bug reporting form 2021-09-01 15:59:12 BUG #17175: The aarch64 repo is missing repomd.xml.asc metadata file, fails GPG verification