Re: Planning counters in pg_stat_statements (using pgss_store)

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, "imai(dot)yoshikazu(at)fujitsu(dot)com" <imai(dot)yoshikazu(at)fujitsu(dot)com>, legrand legrand <legrand_legrand(at)hotmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Planning counters in pg_stat_statements (using pgss_store)
Date: 2020-03-30 04:56:43
Message-ID: 8224bfdf-dcf8-648f-e0d8-1db1d5c215ee@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/03/29 15:15, Julien Rouhaud wrote:
> On Fri, Mar 27, 2020 at 03:42:50PM +0100, Julien Rouhaud wrote:
>> On Fri, Mar 27, 2020 at 2:01 PM Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> wrote:
>>>
>>
>>> So what I'd like to say is that the information that users are interested
>>> in would vary on each situation and case. At least for me it seems
>>> enough for pgss to report only the basic information. Then users
>>> can calculate to get the numbers (like total_time) they're interested in,
>>> from those basic information.
>>>
>>> But of course, I'd like to hear more opinions about this...
>>
>> +1
>>
>> Unless someone chime in by tomorrow, I'll just drop the sum as it
>> seems less controversial and not a blocker in userland if users are
>> interested.
>
> Done in attached v11, with also the s/querytext/query_text/ discrepancy noted
> previously.

Thanks for updating the patch! But I still think query_string is better
name because it's used in other several places, for the sake of consistency.
So I changed the argument name that way and commit the 0001 patch.
If you think query_text is better, let's keep discussing this topic!

Anyway many thanks for your great job!

>>>> I also exported BufferUsageAccumDiff as mentioned previously, as it seems
>>>> clearner and will avoid future useless code churn, and run pgindent.
>>>
>>> Many thanks!! I'm thinking to commit this part separately.
>>> So I made that patch based on your patch. Attached.
>>
>> Thanks! It looks good to me.
>
> I also kept that part in a distinct commit for convenience.

I also pushed 0002 patch. Thanks!

I will review 0003 patch again.

Regards,

--
Fujii Masao
NTT DATA CORPORATION
Advanced Platform Technology Group
Research and Development Headquarters

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2020-03-30 04:57:08 Re: Berserk Autovacuum (let's save next Mandrill)
Previous Message Noah Misch 2020-03-30 04:41:01 Re: [HACKERS] WAL logging problem in 9.4.3?