pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <rhaas@postgresql.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Allow parallel query for prepared statements with generic plans.
Date: Fri, 27 Oct 2017 20:32:14 +0000
Message-ID: <E1e8BIc-00081b-8V@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Allow parallel query for prepared statements with generic plans.

This was always intended to work, but due to an oversight in
max_parallel_hazard_walker, it didn't.  In testing, we missed the
fact that it was only working for custom plans, where the parameter
value has been substituted for the parameter itself early enough
that everything worked.  In a generic plan, the Param node survives
and must be treated as parallel-safe.  SerializeParamList provides
for the transmission of parameter values to workers.

Amit Kapila with help from Kuntal Ghosh.  Some changes by me.

Discussion: http://postgr.es/m/CAA4eK1+_BuZrmVCeua5Eqnm4Co9DAXdM5HPAOE2J19ePbR912Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/682ce911f8f30de39b13cf211fc8ceb8c6cbc01b

Modified Files
--------------
src/backend/optimizer/util/clauses.c          |  8 ++++++--
src/pl/plpgsql/src/pl_exec.c                  | 10 +++++-----
src/test/regress/expected/select_parallel.out | 20 ++++++++++++++++++++
src/test/regress/sql/select_parallel.sql      |  6 ++++++
4 files changed, 37 insertions(+), 7 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)  latest in thread

Message-ID: <E1e8BIc-00081b-8V@gemulon.postgresql.org>
Permalink:  ../E1e8BIc-00081b-8V@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1e8BIc-00081b-8V@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: rhaas@postgresql.org
  Subject: Re: pgsql: Allow parallel query for prepared statements with generic plans.
  In-Reply-To: <E1e8BIc-00081b-8V@gemulon.postgresql.org>
  References: <E1e8BIc-00081b-8V@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox