src/backend/optimizer/path/allpaths.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 5f74d3b..6f73dcd 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -480,6 +480,15 @@ set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, } /* + * Allow a plugin to editorialize on the set of Paths for this base + * relation. It could add new paths (such as CustomPaths) by calling + * add_path(), or add_partial_path() if parallel aware, or delete or + * modify paths added by the core code. + */ + if (set_rel_pathlist_hook) + (*set_rel_pathlist_hook) (root, rel, rti, rte); + + /* * If this is a baserel, we should normally consider gathering any partial * paths we may have created for it. * @@ -496,14 +505,6 @@ set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, bms_membership(root->all_baserels) != BMS_SINGLETON) generate_gather_paths(root, rel, false); - /* - * Allow a plugin to editorialize on the set of Paths for this base - * relation. It could add new paths (such as CustomPaths) by calling - * add_path(), or delete or modify paths added by the core code. - */ - if (set_rel_pathlist_hook) - (*set_rel_pathlist_hook) (root, rel, rti, rte); - /* Now find the cheapest of the paths for this rel */ set_cheapest(rel);