| 706 | } |
| 707 | |
| 708 | Path * |
| 709 | cdbpath_create_broadcast_motion_path(PlannerInfo *root, |
| 710 | Path *subpath, |
| 711 | int numsegments) |
| 712 | { |
| 713 | CdbMotionPath *pathnode; |
| 714 | |
| 715 | /* Create CdbMotionPath node. */ |
| 716 | pathnode = makeNode(CdbMotionPath); |
| 717 | pathnode->path.pathtype = T_Motion; |
| 718 | pathnode->path.parent = subpath->parent; |
| 719 | /* Motion doesn't project, so use source path's pathtarget */ |
| 720 | pathnode->path.pathtarget = subpath->pathtarget; |
| 721 | CdbPathLocus_MakeReplicated(&pathnode->path.locus, numsegments, subpath->parallel_workers); |
| 722 | pathnode->path.rows = subpath->rows; |
| 723 | pathnode->path.pathkeys = NIL; |
| 724 | |
| 725 | /* GPDB_96_MERGE_FIXME: When is a Motion path parallel-safe? I tried |
| 726 | * setting this to 'false' initially, to play it safe, but somehow |
| 727 | * the Paths with motions ended up in gather plans anyway, and tripped |
| 728 | * assertion failures. |
| 729 | */ |
| 730 | pathnode->path.parallel_aware = false; |
| 731 | pathnode->path.parallel_safe = false; |
| 732 | pathnode->path.parallel_workers = subpath->parallel_workers; |
| 733 | |
| 734 | pathnode->subpath = subpath; |
| 735 | pathnode->is_explicit_motion = false; |
| 736 | |
| 737 | /* Cost of motion */ |
| 738 | cdbpath_cost_motion(root, pathnode); |
| 739 | |
| 740 | /* Tell operators above us that slack may be needed for deadlock safety. */ |
| 741 | pathnode->path.motionHazard = true; |
| 742 | pathnode->path.barrierHazard = false; |
| 743 | pathnode->path.rescannable = false; |
| 744 | |
| 745 | return (Path *) pathnode; |
| 746 | } |
| 747 | |
| 748 | /* |
| 749 | */ |
no test coverage detected