Use MAX_PARALLEL_WORKER_LIMIT consistently in guc_tables.c

From: Matthias van de Meent <boekewurm(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Use MAX_PARALLEL_WORKER_LIMIT consistently in guc_tables.c
Date: 2024-10-09 12:34:55
Message-ID: CAEze2WiCiJD+8Wig_wGPyn4vgdPjbnYXy2Rw+9KYi6izTMuP=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Whilst doing some digging in parallel code, I noticed that
max_parallel_maintenance_workers is registered as guc with a manual
value of 1024, while max_parallel_workers_per_gather uses
MAX_PARALLEL_WORKER_LIMIT (also 1024). After some archeology, the
discrepancy seems to have existed ever since
max_parallel_maintenance_workers was originally introduced, as the
patch development that introduced the GUC that eventually got
committed predates the use of MAX_PARALLEL_WORKER_LIMIT in guc.c (now
guc_tables.c), and the change to the definition of sibling GUCs of
max_parallel_workers and max_parallel_workers_per_gather wasn't
noticed during that development.

PFA a trivial one-line patch that makes that a bit more consistent.

Kind regards,

Matthias van de Meent

Attachment Content-Type Size
v1-0001-Use-MAX_PARALLEL_WORKER_LIMIT-consistently.patch application/octet-stream 911 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florents Tselai 2024-10-09 12:38:45 Re: [PATCH] Add some documentation on how to call internal functions
Previous Message Mikael Sand 2024-10-09 12:32:43 Re: Build issue with postgresql 17 undefined reference to `pg_encoding_to_char' and `pg_char_to_encoding'