mirror of
https://github.com/postgres/postgres.git
synced 2025-07-05 07:21:24 +03:00
Enable parallel query by default.
Change max_parallel_degree default from 0 to 2. It is possible that this is not a good idea, or that we should go with 1 worker rather than 2, but we won't find out without trying it. Along the way, reword the documentation for max_parallel_degree a little bit to hopefully make it more clear. Discussion: 20160420174631.3qjjhpwsvvx5bau5@alap3.anarazel.de
This commit is contained in:
@ -2005,10 +2005,14 @@ include_dir 'conf.d'
|
|||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the maximum degree of parallelism for an individual parallel
|
Sets the maximum number of workers that can be started for an
|
||||||
operation. Note that the requested number of workers may not actually
|
individual parallel operation. Parallel workers are taken from the
|
||||||
be available at runtime. Parallel workers are taken from the pool
|
pool of processes established by
|
||||||
of processes established by <xref linkend="guc-max-worker-processes">.
|
<xref linkend="guc-max-worker-processes">. 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.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -113,7 +113,7 @@ int effective_cache_size = DEFAULT_EFFECTIVE_CACHE_SIZE;
|
|||||||
|
|
||||||
Cost disable_cost = 1.0e10;
|
Cost disable_cost = 1.0e10;
|
||||||
|
|
||||||
int max_parallel_degree = 0;
|
int max_parallel_degree = 2;
|
||||||
|
|
||||||
bool enable_seqscan = true;
|
bool enable_seqscan = true;
|
||||||
bool enable_indexscan = true;
|
bool enable_indexscan = true;
|
||||||
|
@ -2662,7 +2662,7 @@ static struct config_int ConfigureNamesInt[] =
|
|||||||
NULL
|
NULL
|
||||||
},
|
},
|
||||||
&max_parallel_degree,
|
&max_parallel_degree,
|
||||||
0, 0, MAX_BACKENDS,
|
2, 0, MAX_BACKENDS,
|
||||||
NULL, NULL, NULL
|
NULL, NULL, NULL
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@
|
|||||||
|
|
||||||
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
|
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
|
||||||
#max_worker_processes = 8
|
#max_worker_processes = 8
|
||||||
#max_parallel_degree = 0 # max number of worker processes per node
|
#max_parallel_degree = 2 # max number of worker processes per node
|
||||||
#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
|
#old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
#backend_flush_after = 0 # 0 disables,
|
#backend_flush_after = 0 # 0 disables,
|
||||||
|
Reference in New Issue
Block a user