Re: Is it useful to record whether plans are generic or custom?

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: Is it useful to record whether plans are generic or custom?
Дата
Msg-id 20201204.153733.555429441402348456.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: Is it useful to record whether plans are generic or custom?  (torikoshia <torikoshia@oss.nttdata.com>)
Ответы Re: Is it useful to record whether plans are generic or custom?  (torikoshia <torikoshia@oss.nttdata.com>)
Re: Is it useful to record whether plans are generic or custom?  (Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>)
Список pgsql-hackers
At Fri, 04 Dec 2020 15:03:25 +0900, torikoshia <torikoshia@oss.nttdata.com> wrote in 
> On 2020-12-04 14:29, Fujii Masao wrote:
> > On 2020/11/30 15:24, Tatsuro Yamada wrote:
> >> Hi Torikoshi-san,
> >> 
> >>> In this patch, exposing new columns is mandatory, but I think
> >>> it's better to make it optional by adding a GUC something
> >>> like 'pgss.track_general_custom_plans.
> >>> I also feel it makes the number of columns too many.
> >>> Just adding the total time may be sufficient.
> >> I think this feature is useful for DBA. So I hope that it gets
> >> committed to PG14. IMHO, many columns are Okay because DBA can
> >> select specific columns by their query.
> >> Therefore, it would be better to go with the current design.
> > But that design may waste lots of memory. No? For example, when
> > plan_cache_mode=force_custom_plan, the memory used for the columns
> > for generic plans is not used.
> > 
> 
> Yeah.
> 
> 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.

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,

> Yamada-san,
> 
> Do you think it's effective just distinguish between generic
> and custom plans?
> 
> Regards,

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Huge memory consumption on partitioned table with FKs
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Refactor MD5 implementations and switch to EVP for OpenSSL