From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: Bruce Momjian <bruce@momjian.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Julien Rouhaud <rjuju123@gmail.com>
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: Thu, 22 Apr 2021 00:28:11 +0900
Message-ID: <a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com> (raw)
In-Reply-To: <20210420162244.GD30205@momjian.us>
References: <20210413021246.GD4231@momjian.us>
<20210413173016.GA29955@alvherre.pgsql>
<20210414183326.GA10946@momjian.us>
<20210420162244.GD30205@momjian.us>
On 2021/04/21 1:22, Bruce Momjian wrote:
> On Wed, Apr 14, 2021 at 02:33:26PM -0400, Bruce Momjian wrote:
>> On Tue, Apr 13, 2021 at 01:30:16PM -0400, Álvaro Herrera wrote:
>>> On 2021-Apr-12, Bruce Momjian wrote:
>>>
>>>> OK, the attached patch renames pg_stat_activity.queryid to 'query_id'. I
>>>> have not changed any of the APIs which existed before this feature was
>>>> added, and are called "queryid" or "queryId" --- it is kind of a mess.
>>>> I assume I should leave those unchanged. It will also need a catversion
>>>> bump.
>>>
>>> I think it is fine actually. These names appear in structs Query and
>>> PlannedStmt, and every single member of those already uses camelCase
>>> naming. Changing those to use "query_id" would look out of place.
>>> You did change the one in PgBackendStatus to st_query_id, which also
>>> matches the naming style in that struct, so that looks fine also.
>>>
>>> So I'm -1 on Julien's first proposed change, and +1 on his second
>>> proposed change (the name of the first argument of
>>> pgstat_report_query_id should be query_id).
>>
>> Thanks for your analysis. Updated patch attached with the change
>> suggested above.
>
> Patch applied.
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
Regards,
--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION
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, bruce@momjian.us, alvherre@alvh.no-ip.org, rjuju123@gmail.com, 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: <a878d5ea-64a7-485e-5d2f-177618ebc52d@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