aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/prep/prepunion.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r--src/backend/optimizer/prep/prepunion.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c
index 71052c841d7..f6046768fb0 100644
--- a/src/backend/optimizer/prep/prepunion.c
+++ b/src/backend/optimizer/prep/prepunion.c
@@ -658,9 +658,10 @@ generate_union_paths(SetOperationStmt *op, PlannerInfo *root,
/* Find the highest number of workers requested for any subpath. */
foreach(lc, partial_pathlist)
{
- Path *path = lfirst(lc);
+ Path *subpath = lfirst(lc);
- parallel_workers = Max(parallel_workers, path->parallel_workers);
+ parallel_workers = Max(parallel_workers,
+ subpath->parallel_workers);
}
Assert(parallel_workers > 0);