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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Sergei Kornilov <sk(at)zsrv(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Simon Riggs <simon(at)2ndQuadrant(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query
Date: 2018-07-06 21:10:18
Message-ID: 20180706211018.2huhxufaw57u6qob@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-Jul-06, Sergei Kornilov wrote:

> 06.07.2018, 22:35, "Robert Haas" <robertmhaas(at)gmail(dot)com>:
> > On Fri, Jul 6, 2018 at 1:26 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >>  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.
> >
> > Yeah, why would a pg_READ_all_stats role let you change stuff?
>
> +1, personally i was surprised first time. But I thought that it was discussed before committing version 1.5
> I read original thread [1] and, as far i see, pg_stat_statements_reset change was not discussed.

Ugh, it's true :-(
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=25fff40798fc4ac11a241bfd9ab0c45c085e2212#patch8

Dave, Simon, any comments?

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-07-06 21:30:55 Re: [HACKERS] Bug in to_timestamp().
Previous Message Peter Eisentraut 2018-07-06 21:08:02 Re: Let's remove DSM_IMPL_NONE.