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 1lOye1-0008Of-Oj for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 08:13:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lOye0-0006un-0h for pgsql-hackers@arkaria.postgresql.org; Wed, 24 Mar 2021 08:13:36 +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 1lOydz-0006ug-Pn for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 08:13:35 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lOydt-0003Lt-Ae for pgsql-hackers@lists.postgresql.org; Wed, 24 Mar 2021 08:13:34 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id CA01E58007C; Wed, 24 Mar 2021 04:12:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 24 Mar 2021 04:12:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=9SgkWbrOl5xdXoVOECTwmLpQRug5alIfKYU14464vto=; b=jSUnQl1J HwMV/eugclqjzxdZ9CvdTvFtGOcNKV4bB57BjlffMdwk7CUS+ivvUkVuQ348C2Js zZWBjKMoKhGxt63R48bGUFPzDToPHJwfo90wWvC936OcDwmYqvWcsCZvWj6PKw3z EDDPSck5jTuthyVxbtzFUx6bzC44leuDPzzm9JDok+5cf82w5+dps1ZAR/nmrEhG lnbEKOHNv/3aQMjYPsTfS0LAq8w/br555lh2iliyGk2ppouge/j7pN1YTF0q/DaC qMQzto30kr6P/sgth/i04E0Bk0dPrANwXWDKlKH32hkErq5dnKA5Y0+E7yYIMUq6 1tdCNd3aY3BhLw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegjedguddujecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjggfsehtkeertddtredunecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpeeufffhjeeiueeuffegvddukeegledtveeivdeiueef ieeivefgteehueefteehvdenucfkphepudeltddrleehrdduledrleehnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegr lhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 6E870240356; Wed, 24 Mar 2021 04:12:37 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 40F3B2A0EDC; Wed, 24 Mar 2021 05:12:35 -0300 (-03) Date: Wed, 24 Mar 2021 05:12:35 -0300 From: Alvaro Herrera To: Bruce Momjian Cc: Julien Rouhaud , Hannu Krosing , Robert Haas , Pavel Stehule , Tom Lane , 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: <20210324081235.GA10492@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210322215554.GA5107@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 2021-Mar-22, Bruce Momjian wrote: > diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat > index e259531f60..9550de0798 100644 > --- a/src/include/catalog/pg_proc.dat > +++ b/src/include/catalog/pg_proc.dat > @@ -5249,9 +5249,9 @@ > proname => 'pg_stat_get_activity', prorows => '100', proisstrict => 'f', > proretset => 't', provolatile => 's', proparallel => 'r', > prorettype => 'record', proargtypes => 'int4', > - proallargtypes => '{int4,oid,int4,oid,text,text,text,text,text,timestamptz,timestamptz,timestamptz,timestamptz,inet,text,int4,xid,xid,text,bool,text,text,int4,text,numeric,text,bool,text,bool,int4}', > - proargmodes => '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', > - proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,leader_pid}', > + proallargtypes => '{int4,oid,int4,oid,text,text,text,text,text,timestamptz,timestamptz,timestamptz,timestamptz,inet,text,int4,xid,xid,text,bool,text,text,int4,text,numeric,text,bool,text,bool,int4,int8}', > + proargmodes => '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}', > + proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,leader_pid,queryid}', BTW why do you put the queryid column at the end of the column list here? It seems awkward. Can we put it perhaps between state and query? > -const char *clean_querytext(const char *query, int *location, int *len); > +const char *CleanQuerytext(const char *query, int *location, int *len); > JumbleState *JumbleQuery(Query *query, const char *querytext); I think pushing in more than one commit is a reasonable approach if they are well-contained, but if you do that it'd be better to avoid introducing a function with one name and renaming it in your next commit. -- Álvaro Herrera Valdivia, Chile "Just treat us the way you want to be treated + some extra allowance for ignorance." (Michael Brusser)