Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZsgE-0001J0-Ql for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 10:04:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lZsgD-0003Tj-PT for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Apr 2021 10:04:57 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZsgD-0003Tb-Iz for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 10:04:57 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZsgA-0005mr-AH for pgsql-hackers@lists.postgresql.org; Fri, 23 Apr 2021 10:04:56 +0000 Received: from hnk.local (p2043043-ipbf1801funabasi.chiba.ocn.ne.jp [221.185.194.43]) by oss.nttdata.com (Postfix) with ESMTPSA id 782FF62828; Fri, 23 Apr 2021 19:04:49 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? To: Magnus Hagander Cc: Julien Rouhaud , Bruce Momjian , Alvaro Herrera , Tom Lane , Nitin Jadhav , Hannu Krosing , Robert Haas , Pavel Stehule , Michael Paquier , torikoshia , Atsushi Torikoshi , Tatsuro Yamada , Tomas Vondra , Evgeny Efimkin , PostgreSQL Hackers References: <20210413021246.GD4231@momjian.us> <20210413173016.GA29955@alvherre.pgsql> <20210414183326.GA10946@momjian.us> <20210420162244.GD30205@momjian.us> <20210422092317.xnuvva2322dflxdm@nol> <98e3f922-629f-fe53-6027-3c668a9a0f70@oss.nttdata.com> From: Fujii Masao Message-ID: Date: Fri, 23 Apr 2021 19:04:48 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/04/23 18:46, Magnus Hagander wrote: > On Fri, Apr 23, 2021 at 9:10 AM Fujii Masao 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 pg_stat_statements.track is set to > + all, 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". > (changes the wording, but also the name of the parameter is > pg_stat_statements.track, not pg_stat_statements.toplevel (that's the > column, not the parameter). Same error in the commit msg except there > you called it pg_stat_statements.top - but that one needed some more > fix as well) > > With those changes, applied. Thanks! Thanks! Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION