]> granicus.if.org Git - postgresql/commit
Don't generate parallel paths for rels with parallel-restricted outputs.
authorRobert Haas <rhaas@postgresql.org>
Thu, 9 Jun 2016 16:40:23 +0000 (12:40 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 9 Jun 2016 16:43:36 +0000 (12:43 -0400)
commitb12fd41c695b43c76b0a9a4d19ba43b05536440c
tree966a7ca8b9c268b70f38257a56aeccaa25fd82b2
parente7bcd983f56136a9580076b60d5c19eb2fd83301
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.
src/backend/nodes/outfuncs.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/util/placeholder.c
src/backend/optimizer/util/relnode.c
src/include/nodes/relation.h