summaryrefslogtreecommitdiff
path: root/doc/src
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 /doc/src
parent4d85c2900b113e331925baf308cc7fc75ac4530b (diff)
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 'doc/src')
-rw-r--r--doc/src/sgml/parallel.sgml16
1 files changed, 4 insertions, 12 deletions
diff --git a/doc/src/sgml/parallel.sgml b/doc/src/sgml/parallel.sgml
index 2a25f21eb4b..1f5efd9e6d9 100644
--- a/doc/src/sgml/parallel.sgml
+++ b/doc/src/sgml/parallel.sgml
@@ -151,9 +151,10 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
<para>
The query writes any data or locks any database rows. If a query
contains a data-modifying operation either at the top level or within
- a CTE, no parallel plans for that query will be generated. This is a
- limitation of the current implementation which could be lifted in a
- future release.
+ a CTE, no parallel plans for that query will be generated. As an
+ exception, the commands <literal>CREATE TABLE</>, <literal>SELECT
+ INTO</>, and <literal>CREATE MATERIALIZED VIEW</> which create a new
+ table and populate it can use a parallel plan.
</para>
</listitem>
@@ -243,15 +244,6 @@ EXPLAIN SELECT * FROM pgbench_accounts WHERE filler LIKE '%x%';
<listitem>
<para>
- A prepared statement is executed using a <literal>CREATE TABLE .. AS
- EXECUTE ..</literal> statement. This construct converts what otherwise
- would have been a read-only operation into a read-write operation,
- making it ineligible for parallel query.
- </para>
- </listitem>
-
- <listitem>
- <para>
The transaction isolation level is serializable. This situation
does not normally arise, because parallel query plans are not
generated when the transaction isolation level is serializable.