* create_gather_path * Creates a path corresponding to a gather scan, returning the * pathnode. * * 'rows' may optionally be set to override row estimates from other sources. */
| 3001 | * 'rows' may optionally be set to override row estimates from other sources. |
| 3002 | */ |
| 3003 | GatherPath * |
| 3004 | create_gather_path(PlannerInfo *root, RelOptInfo *rel, Path *subpath, |
| 3005 | PathTarget *target, Relids required_outer, double *rows) |
| 3006 | { |
| 3007 | Assert(false); |
| 3008 | GatherPath *pathnode = makeNode(GatherPath); |
| 3009 | |
| 3010 | Assert(subpath->parallel_safe); |
| 3011 | |
| 3012 | pathnode->path.pathtype = T_Gather; |
| 3013 | pathnode->path.parent = rel; |
| 3014 | pathnode->path.pathtarget = target; |
| 3015 | pathnode->path.param_info = get_baserel_parampathinfo(root, rel, |
| 3016 | required_outer); |
| 3017 | pathnode->path.parallel_aware = false; |
| 3018 | pathnode->path.parallel_safe = false; |
| 3019 | pathnode->path.parallel_workers = 0; |
| 3020 | pathnode->path.pathkeys = NIL; /* Gather has unordered result */ |
| 3021 | |
| 3022 | pathnode->subpath = subpath; |
| 3023 | pathnode->num_workers = subpath->parallel_workers; |
| 3024 | pathnode->single_copy = false; |
| 3025 | |
| 3026 | if (pathnode->num_workers == 0) |
| 3027 | { |
| 3028 | pathnode->path.pathkeys = subpath->pathkeys; |
| 3029 | pathnode->num_workers = 1; |
| 3030 | pathnode->single_copy = true; |
| 3031 | } |
| 3032 | |
| 3033 | cost_gather(pathnode, root, rel, pathnode->path.param_info, rows); |
| 3034 | |
| 3035 | return pathnode; |
| 3036 | } |
| 3037 | |
| 3038 | /* |
| 3039 | * create_subqueryscan_path |
no test coverage detected