OSDN Git Service

Fix condition to regenerate gather paths
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 17 Jan 2019 09:32:57 +0000 (18:32 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 17 Jan 2019 09:32:57 +0000 (18:32 +0900)
Core has additional condition to determine whether to generate gather
paths and pg_hint_plan forgot it. Fix it.

pg_hint_plan.c

index 302aa36..794aac4 100644 (file)
@@ -4723,7 +4723,8 @@ pg_hint_plan_set_rel_pathlist(PlannerInfo * root, RelOptInfo *rel,
                                }
 
                                /* Generate gather paths */
-                               if (rel->reloptkind == RELOPT_BASEREL)
+                               if (rel->reloptkind == RELOPT_BASEREL &&
+                                       bms_membership(root->all_baserels) != BMS_SINGLETON)
                                        generate_gather_paths(root, rel, false);
                        }
                }