aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-04-26 08:31:38 -0400
committerRobert Haas <rhaas@postgresql.org>2016-04-26 08:35:58 -0400
commit77cd477c4ba885cfa1ba67beaa82e06f2e182b85 (patch)
tree45cd79391da5ae88bdd4913756e9a98db2d6aa95 /src
parentb7351ced425f3937f0a61adb4ade1d4b93bf751d (diff)
downloadpostgresql-77cd477c4ba885cfa1ba67beaa82e06f2e182b85.tar.gz
postgresql-77cd477c4ba885cfa1ba67beaa82e06f2e182b85.zip
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
Diffstat (limited to 'src')
-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
3 files changed, 3 insertions, 3 deletions
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,