diff options
| author | Tom Lane | 2016-08-19 18:03:07 +0000 |
|---|---|---|
| committer | Tom Lane | 2016-08-19 18:03:13 +0000 |
| commit | da1c91631e3577ea5818f855ebb5bd206d559006 (patch) | |
| tree | 90bdd7e1f5929851e2cb948cd08db891c0a24479 /src/backend/nodes | |
| parent | 6f79ae7fe549bed8bbd1f54ddd9b98f8f9a315f5 (diff) | |
Speed up planner's scanning for parallel-query hazards.
We need to scan the whole parse tree for parallel-unsafe functions.
If there are none, we'll later need to determine whether particular
subtrees contain any parallel-restricted functions. The previous coding
retained no knowledge from the first scan, even though this is very
wasteful in the common case where the query contains only parallel-safe
functions. We can bypass all of the later scans by remembering that fact.
This provides a small but measurable speed improvement when the case
applies, and shouldn't cost anything when it doesn't.
Patch by me, reviewed by Robert Haas
Discussion: <3740.1471538387@sss.pgh.pa.us>
Diffstat (limited to 'src/backend/nodes')
| -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 1fab807772c..50019f4164f 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -2029,6 +2029,7 @@ _outPlannerGlobal(StringInfo str, const PlannerGlobal *node) WRITE_BOOL_FIELD(dependsOnRole); WRITE_BOOL_FIELD(parallelModeOK); WRITE_BOOL_FIELD(parallelModeNeeded); + WRITE_CHAR_FIELD(maxParallelHazard); } static void |
