diff options
author | Robert Haas <rhaas@postgresql.org> | 2016-06-09 12:40:23 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2016-06-09 12:43:36 -0400 |
commit | b12fd41c695b43c76b0a9a4d19ba43b05536440c (patch) | |
tree | 966a7ca8b9c268b70f38257a56aeccaa25fd82b2 /src/backend/nodes/outfuncs.c | |
parent | e7bcd983f56136a9580076b60d5c19eb2fd83301 (diff) | |
download | postgresql-b12fd41c695b43c76b0a9a4d19ba43b05536440c.tar.gz postgresql-b12fd41c695b43c76b0a9a4d19ba43b05536440c.zip |
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.
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r-- | src/backend/nodes/outfuncs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index c7b4153c030..2796e5353ae 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -2083,6 +2083,7 @@ _outRelOptInfo(StringInfo str, const RelOptInfo *node) WRITE_BOOL_FIELD(consider_param_startup); WRITE_BOOL_FIELD(consider_parallel); WRITE_NODE_FIELD(reltarget); + WRITE_BOOL_FIELD(reltarget_has_non_vars); WRITE_NODE_FIELD(pathlist); WRITE_NODE_FIELD(ppilist); WRITE_NODE_FIELD(partial_pathlist); |