mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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 <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/x3tlw2jk5gm3r3mv47hwrshffyw7halpczkfbk3peksxds7bvc@lguk43z3bsyq
This commit is contained in:
@ -2618,7 +2618,13 @@ include_dir 'conf.d'
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</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">
|
<varlistentry id="guc-max-worker-processes" xreflabel="max_worker_processes">
|
||||||
<term><varname>max_worker_processes</varname> (<type>integer</type>)
|
<term><varname>max_worker_processes</varname> (<type>integer</type>)
|
||||||
<indexterm>
|
<indexterm>
|
||||||
|
@ -683,6 +683,7 @@ const char *const config_group_names[] =
|
|||||||
[RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
|
[RESOURCES_KERNEL] = gettext_noop("Resource Usage / Kernel Resources"),
|
||||||
[RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
|
[RESOURCES_BGWRITER] = gettext_noop("Resource Usage / Background Writer"),
|
||||||
[RESOURCES_ASYNCHRONOUS] = gettext_noop("Resource Usage / Asynchronous Behavior"),
|
[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_SETTINGS] = gettext_noop("Write-Ahead Log / Settings"),
|
||||||
[WAL_CHECKPOINTS] = gettext_noop("Write-Ahead Log / Checkpoints"),
|
[WAL_CHECKPOINTS] = gettext_noop("Write-Ahead Log / Checkpoints"),
|
||||||
[WAL_ARCHIVING] = gettext_noop("Write-Ahead Log / Archiving"),
|
[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("Controls whether Gather and Gather Merge also run subplans."),
|
||||||
gettext_noop("Should gather nodes also run subplans or just gather tuples?"),
|
gettext_noop("Should gather nodes also run subplans or just gather tuples?"),
|
||||||
GUC_EXPLAIN
|
GUC_EXPLAIN
|
||||||
@ -3234,7 +3235,7 @@ struct config_int ConfigureNamesInt[] =
|
|||||||
{
|
{
|
||||||
{"max_worker_processes",
|
{"max_worker_processes",
|
||||||
PGC_POSTMASTER,
|
PGC_POSTMASTER,
|
||||||
RESOURCES_ASYNCHRONOUS,
|
RESOURCES_WORKER_PROCESSES,
|
||||||
gettext_noop("Maximum number of concurrent worker processes."),
|
gettext_noop("Maximum number of concurrent worker processes."),
|
||||||
NULL,
|
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."),
|
gettext_noop("Sets the maximum number of parallel processes per maintenance operation."),
|
||||||
NULL
|
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."),
|
gettext_noop("Sets the maximum number of parallel processes per executor node."),
|
||||||
NULL,
|
NULL,
|
||||||
GUC_EXPLAIN
|
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."),
|
gettext_noop("Sets the maximum number of parallel workers that can be active at one time."),
|
||||||
NULL,
|
NULL,
|
||||||
GUC_EXPLAIN
|
GUC_EXPLAIN
|
||||||
|
@ -198,6 +198,9 @@
|
|||||||
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
|
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
|
||||||
#maintenance_io_concurrency = 10 # 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)
|
#io_combine_limit = 128kB # usually 1-32 blocks (depends on OS)
|
||||||
|
|
||||||
|
# - Worker Processes -
|
||||||
|
|
||||||
#max_worker_processes = 8 # (change requires restart)
|
#max_worker_processes = 8 # (change requires restart)
|
||||||
#max_parallel_workers_per_gather = 2 # limited by max_parallel_workers
|
#max_parallel_workers_per_gather = 2 # limited by max_parallel_workers
|
||||||
#max_parallel_maintenance_workers = 2 # limited by max_parallel_workers
|
#max_parallel_maintenance_workers = 2 # limited by max_parallel_workers
|
||||||
|
@ -65,6 +65,7 @@ enum config_group
|
|||||||
RESOURCES_KERNEL,
|
RESOURCES_KERNEL,
|
||||||
RESOURCES_BGWRITER,
|
RESOURCES_BGWRITER,
|
||||||
RESOURCES_ASYNCHRONOUS,
|
RESOURCES_ASYNCHRONOUS,
|
||||||
|
RESOURCES_WORKER_PROCESSES,
|
||||||
WAL_SETTINGS,
|
WAL_SETTINGS,
|
||||||
WAL_CHECKPOINTS,
|
WAL_CHECKPOINTS,
|
||||||
WAL_ARCHIVING,
|
WAL_ARCHIVING,
|
||||||
|
Reference in New Issue
Block a user