diff --git a/src/backend/optimizer/plan/planmain.c b/src/backend/optimizer/plan/planmain.c index 213371e1f52..ecabdd9ca82 100644 --- a/src/backend/optimizer/plan/planmain.c +++ b/src/backend/optimizer/plan/planmain.c @@ -254,13 +254,6 @@ restart: */ generate_base_implied_equalities(root); - /* - * We have completed merging equivalence sets, so it's now possible to - * generate pathkeys in canonical form; so compute query_pathkeys and - * other pathkeys fields in PlannerInfo. - */ - (*qp_callback) (root, qp_extra); - /* * Examine any "placeholder" expressions generated during subquery pullup. * Make sure that the Vars they need are marked as needed at the relevant @@ -292,6 +285,13 @@ restart: * this point does not need to be able to restart. */ + /* + * We have completed merging equivalence sets, so it's now possible to + * generate pathkeys in canonical form; so compute query_pathkeys and + * other pathkeys fields in PlannerInfo. + */ + (*qp_callback) (root, qp_extra); + /* * Now distribute "placeholders" to base rels as needed. This has to be * done after join removal because removal could change whether a