Don't generate parallel paths for rels with parallel-restricted outputs.
Robert Haas <rhaas@postgresql.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/nodes/outfuncs.c | modified | +1 −0 |
| src/backend/optimizer/path/allpaths.c | modified | +10 −0 |
| src/backend/optimizer/util/placeholder.c | modified | +2 −0 |
| src/backend/optimizer/util/relnode.c | modified | +7 −3 |
| src/include/nodes/relation.h | modified | +2 −0 |