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 1hugoe-0003lA-RU for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 17:30:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hugod-0002RB-Nj for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Aug 2019 17:30:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hugod-0002R3-Ez for pgsql-hackers@lists.postgresql.org; Mon, 05 Aug 2019 17:30:35 +0000 Received: from n3.nabble.com ([162.255.23.22]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hugoZ-0008TY-Vj for pgsql-hackers@postgresql.org; Mon, 05 Aug 2019 17:30:35 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id A107D1613BEBF for ; Mon, 5 Aug 2019 10:30:29 -0700 (MST) Date: Mon, 5 Aug 2019 10:30:29 -0700 (MST) From: legrand legrand To: pgsql-hackers@postgresql.org Message-ID: <1565026229657-0.post@n3.nabble.com> In-Reply-To: <20190805.162824.123166397.horikyota.ntt@gmail.com> References: <20190731215909.xsygisccnirdld3f@alap3.anarazel.de> <20190801183632.7byx3knosxas4ih3@alap3.anarazel.de> <20190801210514.qdiam2oazua6otkk@alap3.anarazel.de> <1564902241482-0.post@n3.nabble.com> <20190805.162824.123166397.horikyota.ntt@gmail.com> Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view? MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Kyotaro Horiguchi-4 wrote > At Sun, 4 Aug 2019 00:04:01 -0700 (MST), legrand legrand < > legrand_legrand@ > > wrote in < > 1564902241482-0.post@.nabble >> >> > However having the nested queryid in=20 >> > pg_stat_activity would be convenient to track >> > what is a long stored functions currently doing. >>=20 >> +1 >>=20 >> And this could permit to get wait event sampling per queryid when >> pg_stat_statements.track =3D all >=20 > I'm strongly on this side emotionally, but also I'm on Tom and > Andres's side that exposing querid that way is not the right > thing. >=20 > Doing that means we don't need exact correspondence between > top-level query and queryId (in nested or multistatement queries) > in this patch. pg_stat_statements will allow us to do the same > thing by having additional uint64[MaxBackends] array in > pgssSharedState, instead of expanding PgBackendStatus array in > core by the same size. >=20 > regards. >=20 > --=20 > Kyotaro Horiguchi > NTT Open Source Software Center Hi Kyotaro, Thank you for this answer. What you propose here is already available=20 Inside pg_stat_sql_plans extension (a derivative from=20 Pg_stat_statements and pg_store_plans) And I=E2=80=99m used to this queryid behavior with top Level Queries... My emotion was high but I will accept it ! Regards PAscal -- Sent from: https://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.h= tml