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 1lUKcx-000570-CZ for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Apr 2021 02:42:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lUKcw-0007Sg-9T for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Apr 2021 02:42:38 +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 1lUKcw-0007SY-3A for pgsql-hackers@lists.postgresql.org; Thu, 08 Apr 2021 02:42:38 +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 1lUKct-0000Fn-OV for pgsql-hackers@lists.postgresql.org; Thu, 08 Apr 2021 02:42:37 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1lUKcn-0007l7-Ac; Wed, 07 Apr 2021 22:42:29 -0400 Date: Wed, 7 Apr 2021 22:42:29 -0400 From: Bruce Momjian To: Julien Rouhaud Cc: Tom Lane , Nitin Jadhav , Alvaro Herrera , 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: <20210408024229.GJ24239@momjian.us> References: <1646131.1617826550@sss.pgh.pa.us> <20210407202255.GD24239@momjian.us> <20210407215625.syzdpwew4j47hhgl@nol> <20210407223840.GE24239@momjian.us> <1730584.1617836485@sss.pgh.pa.us> <20210407233835.GF24239@momjian.us> <20210408004748.mhqds3v3nij35ihw@nol> <20210408005402.GG24239@momjian.us> <20210408023101.GI24239@momjian.us> <20210408023808.gp75kbrli5df7wkd@nol> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210408023808.gp75kbrli5df7wkd@nol> 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 Thu, Apr 8, 2021 at 10:38:08AM +0800, Julien Rouhaud wrote: > On Wed, Apr 07, 2021 at 10:31:01PM -0400, Bruce Momjian wrote: > > On Wed, Apr 7, 2021 at 08:54:02PM -0400, Bruce Momjian wrote: > > > > Unless I'm missing something this will output the query id in the next log > > > > line? The new code should be added before the newline is output, and the comma > > > > should also be output before the queryid. > > > > > > Yes, correct, updated patch attached. > > > > Patch applied. > > Thanks! And I agree with using query_id in the new field names while keeping > queryid for pg_stat_statements to avoid unnecessary query breakage. I think we need more feedback from the group. Do people agree with the idea above? The question is what to call: GUC compute_queryid pg_stat_activity.queryid pg_stat_statements.queryid using "queryid" or "query_id", and do they have to match? -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com If only the physical world exists, free will is an illusion.