pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow parallel query for prepared statements with generic plans.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Allow parallel query for prepared statements with generic plans.
@ 2017-10-27 20:32  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-10-27 20:32 UTC (permalink / raw)
  To: pgsql-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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Allow parallel query for prepared statements with generic plans.
@ 2017-10-29 16:24  Robert Haas <rhaas@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Robert Haas @ 2017-10-29 16:24 UTC (permalink / raw)
  To: pgsql-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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a87c0c7631d2ec738e78b909f5dcea16ea1e832f

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


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


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-10-29 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27 20:32 pgsql: Allow parallel query for prepared statements with generic plans. Robert Haas <rhaas@postgresql.org>
2017-10-29 16:24 pgsql: Allow parallel query for prepared statements with generic plans. Robert Haas <rhaas@postgresql.org>

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