Use MAX_PARALLEL_WORKER_LIMIT for max_parallel_maintenance_workers
authorMichael Paquier <michael@paquier.xyz>
Sun, 13 Oct 2024 02:20:30 +0000 (11:20 +0900)
committerMichael Paquier <michael@paquier.xyz>
Sun, 13 Oct 2024 02:20:30 +0000 (11:20 +0900)
max_parallel_maintenance_workers has been introduced in 9da0cc35284b,
and used a hardcoded limit of 1024 rather than this variable.

max_parallel_workers and max_parallel_workers_per_gather already used
MAX_PARALLEL_WORKER_LIMIT (1024) as their upper-bound since
6599c9ac3340.

Author: Matthias van de Meent
Reviewed-by: Zhang Mingli
Discussion: https://postgr.es/m/CAEze2WiCiJD+8Wig_wGPyn4vgdPjbnYXy2Rw+9KYi6izTMuP=w@mail.gmail.com

src/backend/utils/misc/guc_tables.c

index 686309db58b983841b8e1b46127a494592a28b67..2c4cc8cd41b5d2b2f581ac94a62b87d09c74f783 100644 (file)
@@ -3463,7 +3463,7 @@ struct config_int ConfigureNamesInt[] =
                        NULL
                },
                &max_parallel_maintenance_workers,
-               2, 0, 1024,
+               2, 0, MAX_PARALLEL_WORKER_LIMIT,
                NULL, NULL, NULL
        },