pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Magnus Hagander <magnus@hagander.net>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Cc: Hannu Krosing <hannuk@google.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: torikoshia <torikoshia@oss.nttdata.com>
Cc: Atsushi Torikoshi <atorik@gmail.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Evgeny Efimkin <efimkin@yandex-team.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: Fri, 23 Apr 2021 19:40:33 +0900
Message-ID: <48073e43-0d55-0f74-e456-4f533c8405a6@oss.nttdata.com> (raw)
In-Reply-To: <CABUevEyLkmQfZCFYwEi2qmqbbzkQbgvPpxShUgVo7JM40TJ-uw@mail.gmail.com>
References: <20210413021246.GD4231@momjian.us>
	<20210413173016.GA29955@alvherre.pgsql>
	<20210414183326.GA10946@momjian.us>
	<20210420162244.GD30205@momjian.us>
	<a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com>
	<20210422092317.xnuvva2322dflxdm@nol>
	<98e3f922-629f-fe53-6027-3c668a9a0f70@oss.nttdata.com>
	<CABUevExg7inWmE8W8W=xsxFgFxn0WZXb8xLi7juMbUNDgbE81g@mail.gmail.com>
	<e5512912-eac9-b163-df2b-e2601ce06d27@oss.nttdata.com>
	<CABUevEyLkmQfZCFYwEi2qmqbbzkQbgvPpxShUgVo7JM40TJ-uw@mail.gmail.com>



On 2021/04/23 19:11, Magnus Hagander wrote:
> On Fri, Apr 23, 2021 at 12:04 PM Fujii Masao
> <masao.fujii@oss.nttdata.com> wrote:
>>
>>
>>
>> On 2021/04/23 18:46, Magnus Hagander wrote:
>>> On Fri, Apr 23, 2021 at 9:10 AM Fujii Masao <masao.fujii@oss.nttdata.com> wrote:
>>>>
>>>>
>>>>
>>>> On 2021/04/22 18:23, Julien Rouhaud wrote:
>>>>> On Thu, Apr 22, 2021 at 12:28:11AM +0900, Fujii Masao wrote:
>>>>>>
>>>>>> I found another small issue in pg_stat_statements docs. The following
>>>>>> description in the docs should be updated so that toplevel is included?
>>>>>>
>>>>>>> This view contains one row for each distinct database ID, user ID and query ID
>>>>>
>>>>> Indeed!  I'm adding Magnus in Cc.
>>>>>
>>>>> PFA a patch to fix at, and also mention that toplevel will only
>>>>> contain True values if pg_stat_statements.track is set to top.
>>>>
>>>> Thanks for the patch! LGTM.
>>>
>>> Agreed, in general. But going by the example a few lines down, I
>>> changed the second part to:
>>>           True if the query was executed as a top level statement
>>> +       (if <varname>pg_stat_statements.track</varname> is set to
>>> +       <literal>all</literal>, otherwise always false)
>>
>> Isn't this confusing? Users may mistakenly read this as that the toplevel
>> column always indicates false if pg_stat_statements.track is not "all".
> 
> Hmm. I think you're right. It should say "always true", shouldn't it?

You're thinking something like the following?

     True if the query was executed as a top level statement
     (if <varname>pg_stat_statements.track</varname> is set to
     <literal>top</literal>, always true)

> So not just confusing, but completely wrong? :)

Yeah :)

I'm fine with the original wording by Julien.
Of course, the parameter name should be corrected as you did, though.

Or what about the following?

     True if the query was executed as a top level statement
     (this can be <literal>false</literal> only if
     <varname>pg_stat_statements.track</varname> is set to
     <literal>all</literal> and nested statements are also tracked)

Regards,

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





view thread (222+ messages)  latest in thread

Message-ID: <48073e43-0d55-0f74-e456-4f533c8405a6@oss.nttdata.com>
Permalink:  ../48073e43-0d55-0f74-e456-4f533c8405a6@oss.nttdata.com/
Also on:    postgresql.org/message-id/48073e43-0d55-0f74-e456-4f533c8405a6@oss.nttdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: masao.fujii@oss.nttdata.com, magnus@hagander.net, rjuju123@gmail.com, bruce@momjian.us, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, nitinjadhavpostgres@gmail.com, hannuk@google.com, robertmhaas@gmail.com, pavel.stehule@gmail.com, michael@paquier.xyz, torikoshia@oss.nttdata.com, atorik@gmail.com, tatsuro.yamada.tf@nttcom.co.jp, tomas.vondra@2ndquadrant.com, efimkin@yandex-team.ru, pgsql-hackers@lists.postgresql.org
  Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
  In-Reply-To: <48073e43-0d55-0f74-e456-4f533c8405a6@oss.nttdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox