aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/src/sgml/config.sgml12
-rw-r--r--src/backend/optimizer/path/costsize.c2
-rw-r--r--src/backend/utils/misc/guc.c2
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
4 files changed, 11 insertions, 7 deletions
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 909b3e23c52..dce1daa73ae 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -2005,10 +2005,14 @@ include_dir 'conf.d'
</term>
<listitem>
<para>
- Sets the maximum degree of parallelism for an individual parallel
- operation. Note that the requested number of workers may not actually
- be available at runtime. Parallel workers are taken from the pool
- of processes established by <xref linkend="guc-max-worker-processes">.
+ Sets the maximum number of workers that can be started for an
+ individual parallel operation. 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 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>
</listitem>
</varlistentry>
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index 4917922ab57..fcb18732d85 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -113,7 +113,7 @@ int effective_cache_size = DEFAULT_EFFECTIVE_CACHE_SIZE;
Cost disable_cost = 1.0e10;
-int max_parallel_degree = 0;
+int max_parallel_degree = 2;
bool enable_seqscan = true;
bool enable_indexscan = true;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 60856dda198..26ca06cfc25 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2662,7 +2662,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&max_parallel_degree,
- 0, 0, MAX_BACKENDS,
+ 2, 0, MAX_BACKENDS,
NULL, NULL, NULL
},
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 14b537ffb17..f3e3de0568f 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -167,7 +167,7 @@
#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
#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
# (change requires restart)
#backend_flush_after = 0 # 0 disables,