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>
Tue, 21 Feb 2017 00:11:44 +0000 (09:11 +0900)
commit4383fcacb0e0ddbee5ce15baae79fed3f46f8d25
tree0a983437207d035b9faf179ca6c33b8763aa07ee
parent40e2860eeb2644918e6e81cf18dc13a91fe4a047
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