1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-20 15:22:23 +03:00

Add max_parallel_workers GUC.

Increase the default value of the existing max_worker_processes GUC
from 8 to 16, and add a new max_parallel_workers GUC with a maximum
of 8.  This way, even if the maximum amount of parallel query is
happening, there is still room for background workers that do other
things, as originally envisioned when max_worker_processes was added.

Julien Rouhaud, reviewed by Amit Kapila and by revised by me.
This commit is contained in:
Robert Haas
2016-12-02 07:42:58 -05:00
parent 5714931b07
commit b460f5d669
9 changed files with 93 additions and 10 deletions

View File

@ -1982,7 +1982,7 @@ include_dir 'conf.d'
<para>
Sets the maximum number of background processes that the system
can support. This parameter can only be set at server start. The
default is 8.
default is 16.
</para>
<para>
@ -2004,8 +2004,9 @@ include_dir 'conf.d'
Sets the maximum number of workers that can be started by a single
<literal>Gather</literal> node. Parallel workers are taken from the
pool of processes established by
<xref linkend="guc-max-worker-processes">. Note that the requested
number of workers may not actually be available at run time. If this
<xref linkend="guc-max-worker-processes">, limited by
<xref linkend="guc-max-parallel-workers">. Note that the requested
number of workers may not actually be available at runtime. If this
occurs, the plan will run with fewer workers than expected, which may
be inefficient. The default value is 2. Setting this value to 0
disables parallel query execution.
@ -2034,6 +2035,22 @@ include_dir 'conf.d'
</listitem>
</varlistentry>
<varlistentry id="guc-max-parallel-workers" xreflabel="max_parallel_workers">
<term><varname>max_parallel_workers</varname> (<type>integer</type>)
<indexterm>
<primary><varname>max_parallel_workers</> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
Sets the maximum number of workers that the system can support for
parallel queries. The default value is 8. When increasing or
decreasing this value, consider also adjusting
<xref linkend="guc-max-parallel-workers-per-gather">.
</para>
</listitem>
</varlistentry>
<varlistentry id="guc-backend-flush-after" xreflabel="backend_flush_after">
<term><varname>backend_flush_after</varname> (<type>integer</type>)
<indexterm>