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: torikoshia <torikoshia@oss.nttdata.com>, Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>, legrand legrand <legrand_legrand@hotmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2021-01-27T22:56:22Z
Lists: pgsql-hackers
Torikoshi-san,

On 2020/12/04 15:03, torikoshia wrote:
>
> ISTM now that creating pg_stat_statements_xxx views
> both for generic andcustom plans is better than my PoC patch.
> 
> 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.
> 
> 
> Yamada-san,
> 
> Do you think it's effective just distinguish between generic
> and custom plans?

Sorry for the super delayed replay.

Ah, it's okay.
It would be better to check both info by using a single view from the
perspective of usability. However, it's okay to divide both information
into two views to use memory effectively.

Regards,
Tatsuro Yamada




Commits

  1. Add generic_plans and custom_plans fields into pg_prepared_statements.