[COMMITTERS] pgsql: Mark finished Plan nodes with parallel_safe flags. - Mailing list pgsql-committers

From Tom Lane
Subject [COMMITTERS] pgsql: Mark finished Plan nodes with parallel_safe flags.
Date
Msg-id E1cyNi3-0002zT-Tz@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Mark finished Plan nodes with parallel_safe flags.

We'd managed to avoid doing this so far, but it seems pretty obvious
that it would be forced on us some day, and this is much the cleanest
way of approaching the open problem that parallel-unsafe subplans are
being transmitted to parallel workers.  Anyway there's no space cost
due to alignment considerations, and the time cost is pretty minimal
since we're just copying the flag from the corresponding Path node.
(At least in most cases ... some of the klugier spots in createplan.c
have to work a bit harder.)

In principle we could perhaps get rid of SubPlan.parallel_safe,
but I thought it better to keep that in case there are reasons to
consider a SubPlan unsafe even when its child plan is parallel-safe.

This patch doesn't actually do anything with the new flags, but
I thought I'd commit it separately anyway.

Note: although this touches outfuncs/readfuncs, there's no need for
a catversion bump because Plan trees aren't stored on disk.

Discussion: https://postgr.es/m/87tw5x4vcu.fsf@credativ.de

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/003d80f3dfadd57c6aac8480436ff53ee2c978bd

Modified Files
--------------
src/backend/nodes/copyfuncs.c           |  1 +
src/backend/nodes/outfuncs.c            |  1 +
src/backend/nodes/readfuncs.c           |  1 +
src/backend/optimizer/plan/createplan.c | 31 +++++++++++++++++++++++++------
src/backend/optimizer/plan/planner.c    |  7 +++----
src/backend/optimizer/plan/subselect.c  | 15 +++++++--------
src/include/nodes/plannodes.h           |  1 +
7 files changed, 39 insertions(+), 18 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: [COMMITTERS] pgsql: Remove some tabs in SQL code in C string literals
Next
From: Bruce Momjian
Date:
Subject: [COMMITTERS] pgsql: git_changelog: improve instructions for finding branch commits