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

From Michael Paquier
Subject Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query
Date
Msg-id 20181119015511.GC1578@paquier.xyz
Whole thread Raw
In response to Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Responses Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Mon, Nov 19, 2018 at 10:41:22AM +1100, Haribabu Kommi wrote:
> So 6 new functions needs to be added to cover all the above cases,
> IMO, we may need functions for all combinations, because I feel some
> user may have the requirement of left out combination, in case if we choose
> only some combinations.

That's bloating the interface in my opinion.

Another choice #e would be to keep the function as not strict, but
defaulting to the current database if NULL is used for the database ID
and defaulting to the current user if NULL is used for the user ID.  For
the query ID, if NULL is given in output, process all queries matching
with (database,user), removing nothing if there is no match.  If the
caller has set up a query ID the rest of the stats should not be
touched.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] PoC: full merge join on comparison clause
Next
From: Michael Paquier
Date:
Subject: Re: New GUC to sample log queries