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-04-02 02:32:50
Message-ID: 13923268-bad9-80f9-2542-5fd5e8b8c500@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020/04/01 18:19, Fujii Masao wrote:
>
>
> On 2020/04/01 3:42, Julien Rouhaud wrote:
>> On Wed, Apr 01, 2020 at 02:43:10AM +0900, Fujii Masao wrote:
>>>
>>>
>>> On 2020/03/31 16:33, Julien Rouhaud wrote:
>>>>
>>>> v12 attached!
>>>
>>> Thanks for updating the patch! The patch looks good to me.
>>>
>>> I applied minor and cosmetic changes into the patch. Attached is
>>> the updated version of the patch. Barring any objection, I'd like to
>>> commit this version.
>>>
>>> BTW, the minor and cosmetic changes that I applied are, for example,
>>>
>>> - Rename pgss_planner_hook to pgss_planner for the sake of consistency.
>>>     Other function using hook in pgss doesn't use "_hook" in their names, too.
>>> - Make pgss_planner use PG_FINALLY() instead of PG_CATCH().
>>> - Make PGSS_NUMKIND as the last value in enum pgssStoreKind.
>>
>>
>> +1, and the PGSS_INVALID is also way better.
>>
>>
>>> - Update the sample output in the document.
>>> etc
>>
>>
>> Thanks a lot.  It all looks good to me!

Finally I pushed the patch!
Many thanks for all involved in this patch!

As a remaining TODO item, I'm thinking that the document would need to
be improved. For example, previously the query was not stored in pgss
when it failed. But, in v13, if pgss_planning is enabled, such a query is
stored because the planning succeeds. Without the explanation about
that behavior in the document, I'm afraid that users will get confused.
Thought?

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-04-02 02:47:46 Re: [PATCH] Incremental sort (was: PoC: Partial sort)
Previous Message Tomas Vondra 2020-04-02 02:29:04 Re: WIP: BRIN multi-range indexes