OSDN Git Service

Refactor hint application mechamism
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 9 Feb 2017 01:50:29 +0000 (10:50 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 9 Feb 2017 01:50:29 +0000 (10:50 +0900)
commita5663e67fa77a613ab3dbf49cdbc698239ab848d
tree0a983437207d035b9faf179ca6c33b8763aa07ee
parentd7880ebdf67fda576e7f672d1338fa6ace4870b7
Refactor hint application mechamism

Before we have the new hook set_rel_pathlist_hook, plan enforcment is
performed in two steps, one works only for queries with one relation,
the other works only for joins. Now they are performed once and at
once in set_rel_pathlist_hook. As a byproduct of this refactoring,
index restriction no longer runs for indexes on constraint-excluded
relations and expected/ut-S.out changed a bit.

The major changes by this patch are the followings.

- Remove hook to get_relation_info_hook:
  The function for the hook pg_hint_plan_get_relation_info is removed.

- pg_hint_plan_join_search no longer calls rebuild_scan_path. The
  function and a copied function set_plain_rel_pathlist are removed.

- delete_indexes has been renamed to restrict_indexes, which
  represents the functionality clearer. And the function was
  refactored main for readablity.

- Added several regtests for parallel.
core.c
expected/pg_hint_plan.out
expected/ut-S.out
expected/ut-W.out
make_join_rel.c
pg_hint_plan.c
sql/ut-W.sql