Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Date
Msg-id CAHGQGwE8Roydg-bVweK8GjpOipWh3rAAstMqoUfz7qBFrs8Tuw@mail.gmail.com
Whole thread Raw
In response to Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query  (Sergei Kornilov <sk@zsrv.org>)
Responses Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Fri, Jul 6, 2018 at 3:34 AM, Sergei Kornilov <sk@zsrv.org> wrote:
> Hello
>
>> Currently pg_stat_statements_reset() and other stats reset functions like
>> pg_stat_reset() can be executed only by superusers.
>> But why did you allow pg_read_all_stats role to execute that function,
>> by default? That change looks strange to me.
> This is not behavior change, only fix documentation to current state. Commit
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=25fff40798fc4ac11a241bfd9ab0c45c085e2212creates 1.5
versionand grant execute to pg_read_all_stats
 

Hmm... so pg_stat_statements_reset() is allowed to be executed by
pg_read_all_stats role while other stats reset functions like
pg_stat_reset() can be executed only by superusers. Which looks
strange and inconsistent to me.

Regards,

-- 
Fujii Masao


pgsql-hackers by date:

Previous
From: Sichen Zhao
Date:
Subject: pgbench issue
Next
From: Dave Cramer
Date:
Subject: pg_recvlogical use of SIGHUP