Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query
Дата
Msg-id 20181129055608.GA2356@paquier.xyz
обсуждение исходный текст
Ответ на Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Amit Kapila <amit.kapila16@gmail.com>)
Список pgsql-hackers
On Thu, Nov 29, 2018 at 09:09:48AM +0530, Amit Kapila wrote:
> On Thu, Nov 29, 2018 at 8:46 AM Michael Paquier <michael@paquier.xyz> wrote:
>> With option 4 (as defined in [1]), the database ID or the user ID set to
>> 0 means that we don't apply any filter on them, which is sensible.  Now,
>> we have query IDs which can be set to 0, like parseable utility
>> statements.
>
> I think we ensure that queryId won't be 0 for utility statements.

Oh, pgss_store() makes sure to enforce the query ID which has been
calculated in the post-analyze hook.  That's a bit weird to be honest.

>>  When a query ID is set to 0, does this mean that all query
>> IDs matching 0 are reset?  Or does that mean that we don't filter out by
>> query ID?
>>
>
> It means the later one "We don't apply any filter for queryId.".

Seems like it will be possible to live happily with option 4 then.
--
Michael

Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: pg_config wrongly marked as not parallel safe?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_config wrongly marked as not parallel safe?