OSDN Git Service

Correctly handle planner nesting
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 26 Feb 2019 07:10:29 +0000 (16:10 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Tue, 26 Feb 2019 08:49:50 +0000 (17:49 +0900)
commit647bad47746afec7b58d3a498bce6f36bd9ae984
tree6d87e6e2e968c78ec27b0f96245ffbe37ed1fa85
parent8cc5d9651b4ea38a37f711ca047a624a5f2ab7f9
Correctly handle planner nesting

pg_hint_plan assumed that plpgsql is the only source of nested planner
calls. Actually nested call can be made in any shapes. Most of the
cases doesn't harm but in a special case where pg_dbms_stats makes a
SPI call during query planning, that affects subsequent planner
work. Hints lose effect when pg_dbms_stats searches "locked
statistics" tables while planning the target query.
pg_hint_plan.c