Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, Amit Kapila <amit.kapila16@gmail.com>, Magnus Hagander <magnus@hagander.net>, sk@zsrv.org, Robert Haas <robertmhaas@gmail.com>, Fujii Masao <masao.fujii@gmail.com>, Ashutosh Sharma <ashu.coek88@gmail.com>, Euler Taveira <euler@timbira.com.br>, Pg Hackers <pgsql-hackers@postgresql.org>, Simon Riggs <simon@2ndquadrant.com>, Dave Page <dpage@pgadmin.org>
Date: 2018-11-19T01:55:11Z
Lists: 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
Commits
-
Extend pg_stat_statements_reset to reset statistics specific to a
- 43cbedab8ff1 12.0 landed
-
Default monitoring roles
- 25fff40798fc 10.0 cited