mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user