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

From Haribabu Kommi
Subject Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Date
Msg-id CAJrrPGcG9bO9PDyWsh3F=qdOYUTxuzd2FcvQLkqL5Djmv-au8A@mail.gmail.com
Whole thread Raw
In response to Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
List pgsql-hackers

On Mon, Nov 19, 2018 at 1:37 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
On 2018-Nov-19, Michael Paquier wrote:

> 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.

I understand.

Let's call for a vote from a larger audience.  It's important to get
this interface right, ISTM.

Amit suggested another option in another mail, so total viable 
solutions that are discussed as of now are,

1. Single API with NULL input treat as invalid value
2. Multiple API to deal with NULL input of other values
3. Single API with NULL value to treat them as current user, current database
 and NULL queryid.
4. Single API with -1 as invalid value, treat NULL as no matching. (Only problem
 with this approach is till now -1 is also a valid queryid, but setting -1 as queryid
needs to be avoided.

I prefer single API. I can go with either 3 or 4.

opinion from others?

Regards,
Haribabu Kommi
Fujitsu Australia

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: WIP: Avoid creation of the free space map for small tables
Next
From: Andrey Lepikhov
Date:
Subject: Re: [PATCH] XLogReadRecord returns pointer to currently read page