Re: Is it useful to record whether plans are generic or custom?
Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
From: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, torikoshia@oss.nttdata.com
Cc: masao.fujii@oss.nttdata.com, pavel.stehule@gmail.com,
legrand_legrand@hotmail.com, pgsql-hackers@postgresql.org
Date: 2021-01-27T23:02:02Z
Lists: pgsql-hackers
Horiguchi-san, On 2020/12/04 15:37, Kyotaro Horiguchi wrote: >> And I'm also struggling with the following. >> >> | However, I also began to wonder how effective it would be to just >> | distinguish between generic and custom plans. Custom plans can >> | include all sorts of plans. and thinking cache validation, generic >> | plans can also include various plans. >> >> | Considering this, I'm starting to feel that it would be better to >> | not just keeping whether generic or cutom but the plan itself as >> | discussed in the below thread. > > FWIW, that seems to me to be like some existing extension modules, > pg_stat_plans or pg_store_plans.. The former is faster but may lose > plans, the latter doesn't lose plans but slower. I feel that we'd > beter consider simpler feature if we are intendeng it to be a part of > a contrib module, There is also pg_show_plans. Ideally, it would be better to able to track all of the plan changes by checking something view since Plan Stability is important for DBA when they use PostgreSQL in Mission-critical systems. I prefer that the feature will be released as a contrib module. :-D Regards, Tatsuro Yamada
Commits
-
Add generic_plans and custom_plans fields into pg_prepared_statements.
- d05b172a760e 14.0 landed