pgsql: Fix interaction of parallel query with prepared statements.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix interaction of parallel query with prepared statements.
Date: 2016-12-06 16:46:47
Message-ID: E1cEItD-00084R-PS@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix interaction of parallel query with prepared statements.

Previously, a prepared statement created via a Parse message could get
a parallel plan, but one created with a PREPARE statement could not.
This state of affairs was due to confusion on my (rhaas) part: I
erroneously believed that a CREATE TABLE .. AS EXECUTE statement could
only be performed with a prepared statement by PREPARE, but in fact
one created by a Prepare message works just as well. Therefore, it
makes no sense to allow parallel query in one case but not the other.

To fix, allow parallel query with all prepared statements, but run
the parallel plan serially (i.e. without workers) in the case of
CREATE TABLE .. AS EXECUTE. Also, document this.

Amit Kapila and Tobias Bussman, plus an extra sentence of
documentation by me.

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ebe5dc9e02a6464713bd48e266eee48351d23062

Modified Files
--------------
doc/src/sgml/parallel.sgml | 9 +++++++++
src/backend/commands/prepare.c | 2 +-
src/backend/executor/execMain.c | 7 ++++---
3 files changed, 14 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-12-06 18:36:09 Re: [COMMITTERS] pgsql: Account for catalog snapshot in PGXACT->xmin updates.
Previous Message Alvaro Herrera 2016-12-06 15:46:51 pgsql: Revert "Permit dump/reload of not-too-large >1GB tuples"