summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2025-02-11 16:39:19 +0000
committerAndres Freund2025-02-11 17:53:40 +0000
commit740766d37cdf466438c0ccb6c4c8acaa62a7fc90 (patch)
tree62ab181e85d4a47ae4e7e79c207af2c40304ff2f
parentc366d2bdba7c3b9b2cca1429d4535866e231ca55 (diff)
config: Split "Worker Processes" out of "Asynchronous Behavior"
Having all the worker related GUCs in the same section as IO controlling GUCs doesn't really make sense. Create a separate section for them. Reviewed-by: Tom Lane <[email protected]> Discussion: https://postgr.es/m/x3tlw2jk5gm3r3mv47hwrshffyw7halpczkfbk3peksxds7bvc@lguk43z3bsyq
-rw-r--r--doc/src/sgml/config.sgml6
-rw-r--r--src/backend/utils/misc/guc_tables.c11
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample3
-rw-r--r--src/include/utils/guc_tables.h1
4 files changed, 16 insertions, 5 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 38244409e3c..bd0dffa3e24 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2618,7 +2618,13 @@ include_dir 'conf.d'
</para>
</listitem>
</varlistentry>
+ </variablelist>
+ </sect2>
+ <sect2 id="runtime-config-resource-worker-processes">
+ <title>Worker Processes</title>
+
+ <variablelist>
<varlistentry id="guc-max-worker-processes" xreflabel="max_worker_processes">
<term><varname>max_worker_processes</varname> (<type>integer</type>)
<indexterm>
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index ce7534d4d23..779b6098ada 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -683,6 +683,7 @@ const char *const config_group_names[] =
[RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
[RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
[RESOURCES_ASYNCHRONOUS] = gettext_noop("Resource Usage / Asynchronous Behavior"),
+ [RESOURCES_WORKER_PROCESSES] = gettext_noop("Resource Usage / Worker Processes"),
[WAL_SETTINGS] = gettext_noop("Write-Ahead Log / Settings"),
[WAL_CHECKPOINTS] = gettext_noop("Write-Ahead Log / Checkpoints"),
[WAL_ARCHIVING] = gettext_noop("Write-Ahead Log / Archiving"),
@@ -1962,7 +1963,7 @@ struct config_bool ConfigureNamesBool[] =
},
{
- {"parallel_leader_participation", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
+ {"parallel_leader_participation", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
gettext_noop("Controls whether Gather and Gather Merge also run subplans."),
gettext_noop("Should gather nodes also run subplans or just gather tuples?"),
GUC_EXPLAIN
@@ -3234,7 +3235,7 @@ struct config_int ConfigureNamesInt[] =
{
{"max_worker_processes",
PGC_POSTMASTER,
- RESOURCES_ASYNCHRONOUS,
+ RESOURCES_WORKER_PROCESSES,
gettext_noop("Maximum number of concurrent worker processes."),
NULL,
},
@@ -3496,7 +3497,7 @@ struct config_int ConfigureNamesInt[] =
},
{
- {"max_parallel_maintenance_workers", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
+ {"max_parallel_maintenance_workers", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
gettext_noop("Sets the maximum number of parallel processes per maintenance operation."),
NULL
},
@@ -3506,7 +3507,7 @@ struct config_int ConfigureNamesInt[] =
},
{
- {"max_parallel_workers_per_gather", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
+ {"max_parallel_workers_per_gather", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
gettext_noop("Sets the maximum number of parallel processes per executor node."),
NULL,
GUC_EXPLAIN
@@ -3517,7 +3518,7 @@ struct config_int ConfigureNamesInt[] =
},
{
- {"max_parallel_workers", PGC_USERSET, RESOURCES_ASYNCHRONOUS,
+ {"max_parallel_workers", PGC_USERSET, RESOURCES_WORKER_PROCESSES,
gettext_noop("Sets the maximum number of parallel workers that can be active at one time."),
NULL,
GUC_EXPLAIN
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index c40b7a3121e..7a77238646e 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -198,6 +198,9 @@
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
#maintenance_io_concurrency = 10 # 1-1000; 0 disables prefetching
#io_combine_limit = 128kB # usually 1-32 blocks (depends on OS)
+
+# - Worker Processes -
+
#max_worker_processes = 8 # (change requires restart)
#max_parallel_workers_per_gather = 2 # limited by max_parallel_workers
#max_parallel_maintenance_workers = 2 # limited by max_parallel_workers
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index 3f18ff451ef..0b16b4dcf57 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -65,6 +65,7 @@ enum config_group
RESOURCES_KERNEL,
RESOURCES_BGWRITER,
RESOURCES_ASYNCHRONOUS,
+ RESOURCES_WORKER_PROCESSES,
WAL_SETTINGS,
WAL_CHECKPOINTS,
WAL_ARCHIVING,