aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/execMain.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-10-05 11:34:38 -0400
committerRobert Haas <rhaas@postgresql.org>2017-10-05 11:40:48 -0400
commite9baa5e9fa147e00a2466ab2c40eb99c8a700824 (patch)
tree1cc453bdc454dedc105339b97a4b3a98389bd2a1 /src/backend/executor/execMain.c
parent4d85c2900b113e331925baf308cc7fc75ac4530b (diff)
downloadpostgresql-e9baa5e9fa147e00a2466ab2c40eb99c8a700824.tar.gz
postgresql-e9baa5e9fa147e00a2466ab2c40eb99c8a700824.zip
Allow DML commands that create tables to use parallel query.
Haribabu Kommi, reviewed by Dilip Kumar and Rafia Sabih. Various cosmetic changes by me to explain why this appears to be safe but allowing inserts in parallel mode in general wouldn't be. Also, I removed the REFRESH MATERIALIZED VIEW case from Haribabu's patch, since I'm not convinced that case is OK, and hacked on the documentation somewhat. Discussion: http://postgr.es/m/CAJrrPGdo5bak6qnPWe8Kpi8g_jfQEs-G4SYmG9y+OFaw2-dPvA@mail.gmail.com
Diffstat (limited to 'src/backend/executor/execMain.c')
-rw-r--r--src/backend/executor/execMain.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 62fb05efac6..384ad70f2d9 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1697,11 +1697,9 @@ ExecutePlan(EState *estate,
/*
* If the plan might potentially be executed multiple times, we must force
- * it to run without parallelism, because we might exit early. Also
- * disable parallelism when writing into a relation, because no database
- * changes are allowed in parallel mode.
+ * it to run without parallelism, because we might exit early.
*/
- if (!execute_once || dest->mydest == DestIntoRel)
+ if (!execute_once)
use_parallel_mode = false;
if (use_parallel_mode)