aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-05-06 14:43:34 -0400
committerRobert Haas <rhaas@postgresql.org>2016-05-06 14:50:54 -0400
commitc7ea68ff8dfafc22c6cfefdb5929e12ec5d1e02a (patch)
tree5e8d787c20e4bbb7181b626fc439d63f9ef45d6d
parent73b9952e8278b9c9a6f5f8e2df196fea5abb61f0 (diff)
downloadpostgresql-c7ea68ff8dfafc22c6cfefdb5929e12ec5d1e02a.tar.gz
postgresql-c7ea68ff8dfafc22c6cfefdb5929e12ec5d1e02a.zip
Limit maximum parallel degree to 1024.
This new limit affects both the max_parallel_degree GUC and the parallel_degree reloption. There may some day be a use case for using more than 1024 CPUs for a single query, but that's surely not the case right now. Not only do not very many people have that many CPUs, but the code hasn't been tested at that kind of scale and is very unlikely to perform well, or even work at all, without a lot more work. The issue addressed by commit 06bd458cb812623c3f1fdd55216c4c08b06a8447 is probably just one problem of many. The idea of a more reasonable limit here was suggested by Tom Lane; the value of 1024 was suggested by Amit Kapila.
-rw-r--r--src/backend/access/common/reloptions.c2
-rw-r--r--src/backend/utils/misc/guc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/access/common/reloptions.c b/src/backend/access/common/reloptions.c
index 797be63c44b..7448c7f30fe 100644
--- a/src/backend/access/common/reloptions.c
+++ b/src/backend/access/common/reloptions.c
@@ -275,7 +275,7 @@ static relopt_int intRelOpts[] =
RELOPT_KIND_HEAP,
AccessExclusiveLock
},
- -1, 0, MAX_BACKENDS
+ -1, 0, 1024
},
/* list terminator */
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 752f823a164..e246a9c2f0b 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,
- 2, 0, MAX_BACKENDS,
+ 2, 0, 1024,
NULL, NULL, NULL
},