Re: compute_query_id and pg_stat_statements

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: compute_query_id and pg_stat_statements
Дата
Msg-id 20210512.144447.2143676030143117355.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: compute_query_id and pg_stat_statements  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
At Wed, 12 May 2021 14:33:35 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> Ok, if we want to support alternative providers from the first, we
> need to actually write the loader code for query-id providers.  It
> would not be so hard?, but it might not be suitable to this stage so I
> proposed that to get rid of needing such complexity for now.
> 
> (Anyway I prefer to load query-id provider as a dynamically loadable
>  module rather than hook-function.)
...
> So, for example, how about the following interface?
> 
> GUC query_id_provider:
> 
> - 'none' : query_id is not calculated, don't allow loading external
>            generator module.
> 
> - 'default' : use default provider and calculate query-id.
> 
> - '<provider-name>' : use the provider and calculate query-id using it.
> 
> - 'auto' : query_id is not calculated, but allow to load query-id
>            provider if queryIdWanted() is called.
> 
> # of course 'auto' and 'default' are inhibited as the provier name.
> 
> - core function bool queryIdWanted(char *provider_name, bool use_existing)
> 
>  Allows extensions to request to load a provider if not yet, then
>  start calculating query-id.  Returns true if the request is accepted.
> 
>  provider_name :
> 
>   - 'default' or '<provider-name>': requests the provider to be loaded
>     and start calculating query-id. Refuse the request if 'none' is
>     set to query_id_provider.
> 
>  use_existing: Set true to allow using a provider already loaded.
>     Otherwise refuses the request if any other provider than
>     prvoder_name is already loaded.
> 
> In most cases users set query_id_provider to 'auto' and extensions
> call queryIdWanted with ('default', true).

Hmm. They are in contradiction.  Based on this future picture, at this
stage it can be simplified to allowing only 'default' as the provider
name.

If you want to support any other provider at this point,,, we need to
imlement the full-spec?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: parallel vacuum - few questions on docs, comments and code
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: compute_query_id and pg_stat_statements