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 1lYt9R-0000Ht-Tm for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 16:23:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYt9Q-0002FZ-Ro for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 16:23:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYt9Q-0002FS-L9 for pgsql-hackers@lists.postgresql.org; Tue, 20 Apr 2021 16:23:00 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYt9M-0002iW-Eb for pgsql-hackers@lists.postgresql.org; Tue, 20 Apr 2021 16:23:00 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lYt9A-0003ih-OG; Tue, 20 Apr 2021 12:22:44 -0400 Date: Tue, 20 Apr 2021 12:22:44 -0400 From: Bruce Momjian To: Alvaro Herrera Cc: Julien Rouhaud , Tom Lane , Nitin Jadhav , Hannu Krosing , Robert Haas , Pavel Stehule , Michael Paquier , torikoshia , Atsushi Torikoshi , Tatsuro Yamada , Tomas Vondra , Evgeny Efimkin , PostgreSQL Hackers Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? Message-ID: <20210420162244.GD30205@momjian.us> References: <20210413021246.GD4231@momjian.us> <20210413173016.GA29955@alvherre.pgsql> <20210414183326.GA10946@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210414183326.GA10946@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.