Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4ySl-0008SL-0u for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Mar 2019 01:50:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h4ySj-0005qK-FI for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Mar 2019 01:50:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4ySj-0005qB-3w for pgsql-hackers@lists.postgresql.org; Sat, 16 Mar 2019 01:50:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h4ySg-0006qU-Li for pgsql-hackers@lists.postgresql.org; Sat, 16 Mar 2019 01:50:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x2G1o82E021801; Fri, 15 Mar 2019 21:50:08 -0400 From: Tom Lane To: Yun Li cc: pgsql-hackers@lists.postgresql.org Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? In-reply-to: References: Comments: In-reply-to Yun Li message dated "Fri, 15 Mar 2019 14:54:19 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <21799.1552701008.1@sss.pgh.pa.us> Date: Fri, 15 Mar 2019 21:50:08 -0400 Message-ID: <21800.1552701008@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Yun Li writes: > Do you think if we can add queryId into the pg_stat_get_activity function > and ultimatly expose it in the view? It would be easier to track "similar" > query's performance over time easier. No, we're not likely to do that, because it would mean (1) baking one single definition of "query ID" into the core system and (2) paying the cost to calculate that ID all the time. pg_stat_statements has a notion of query ID, but that notion might be quite inappropriate for other usages, which is why it's an extension and not core. regards, tom lane