pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <rjuju123@gmail.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Cc: Hannu Krosing <hannuk@google.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: torikoshia <torikoshia@oss.nttdata.com>
Cc: Atsushi Torikoshi <atorik@gmail.com>
Cc: Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: Evgeny Efimkin <efimkin@yandex-team.ru>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Magnus Hagander <magnus@hagander.net>
Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Date: Thu, 22 Apr 2021 17:23:18 +0800
Message-ID: <20210422092317.xnuvva2322dflxdm@nol> (raw)
In-Reply-To: <a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com>
References: <20210413021246.GD4231@momjian.us>
	<20210413173016.GA29955@alvherre.pgsql>
	<20210414183326.GA10946@momjian.us>
	<20210420162244.GD30205@momjian.us>
	<a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com>

On Thu, Apr 22, 2021 at 12:28:11AM +0900, Fujii Masao wrote:
> 
> I found another small issue in pg_stat_statements docs. The following
> description in the docs should be updated so that toplevel is included?
> 
> > This view contains one row for each distinct database ID, user ID and query ID

Indeed!  I'm adding Magnus in Cc.

PFA a patch to fix at, and also mention that toplevel will only
contain True values if pg_stat_statements.track is set to top.

Attachments:

v1-0001-doc-Mention-that-toplevel-is-part-of-pg_stat_stat.patch (text/x-diff, 1.6K) download From a1fe3e32ca3c59b059fd87b3070201ce4e7d0e70 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud <julien.rouhaud@free.fr> Date: Thu, 22 Apr 2021 17:14:45 +0800 Subject: [PATCH v1] doc: Mention that toplevel is part of pg_stat_statements key. While at it, also document that toplevel can only be true if pg_stat_statements.top is set to top. Author: Julien Rouhaud Reported-by: Fuji Masao Discussion: https://postgr.es/m/a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com --- doc/src/sgml/pgstatstatements.sgml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index a0c315aa97..561452c624 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -46,8 +46,8 @@ <para> The statistics gathered by the module are made available via a view named <structname>pg_stat_statements</structname>. This view - contains one row for each distinct database ID, user ID and query - ID (up to the maximum number of distinct statements that the module + contains one row for each distinct database ID, user ID, query ID and + toplevel (up to the maximum number of distinct statements that the module can track). The columns of the view are shown in <xref linkend="pgstatstatements-columns"/>. </para> @@ -93,6 +93,8 @@ </para> <para> True if the query was executed as a top level statement + (requires <varname>pg_stat_statements.toplevel</varname> to be set to + <literal>all</literal> to see false values) </para></entry> </row> -- 2.30.1

view thread (222+ messages)  latest in thread

Message-ID: <20210422092317.xnuvva2322dflxdm@nol>
Permalink:  ../20210422092317.xnuvva2322dflxdm@nol/
Also on:    postgresql.org/message-id/20210422092317.xnuvva2322dflxdm@nol

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: rjuju123@gmail.com, masao.fujii@oss.nttdata.com, bruce@momjian.us, alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, nitinjadhavpostgres@gmail.com, hannuk@google.com, robertmhaas@gmail.com, pavel.stehule@gmail.com, michael@paquier.xyz, torikoshia@oss.nttdata.com, atorik@gmail.com, tatsuro.yamada.tf@nttcom.co.jp, tomas.vondra@2ndquadrant.com, efimkin@yandex-team.ru, magnus@hagander.net
  Subject: Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
  In-Reply-To: <20210422092317.xnuvva2322dflxdm@nol>
  References: <20210413021246.GD4231@momjian.us> <20210413173016.GA29955@alvherre.pgsql> <20210414183326.GA10946@momjian.us> <20210420162244.GD30205@momjian.us> <a878d5ea-64a7-485e-5d2f-177618ebc52d@oss.nttdata.com> <20210422092317.xnuvva2322dflxdm@nol>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox