Don't generate parallel paths for rels with parallel-restricted outputs.
Such paths are unsafe. To make it cheaper to detect when this case
applies, track whether a relation's default PathTarget contains any
non-Vars. In most cases, the answer will be no, which enables us to
determine cheaply that the target list for a proposed path is
parallel-safe. However, subquery pull-up can create cases that
require us to inspect the target list more carefully.
Amit Kapila, reviewed by me.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/b12fd41c695b43c76b0a9a4d19ba43b05536440c
Modified Files
--------------
src/backend/nodes/outfuncs.c | 1 +
src/backend/optimizer/path/allpaths.c | 10 ++++++++++
src/backend/optimizer/util/placeholder.c | 2 ++
src/backend/optimizer/util/relnode.c | 10 +++++++---
src/include/nodes/relation.h | 2 ++
5 files changed, 22 insertions(+), 3 deletions(-)