Tiny update to pg_stat_statements documentation

Started by Greg Nancarrowover 4 years ago7 messages
#1Greg Nancarrow
gregn4422@gmail.com
1 attachment(s)

Hi,

I noticed that the pg_stat_statements documentation doesn't include
the necessary config parameter setting "compute_query_id = on" in the
"typical usage" (so if you just used those existing typical usage
settings, the tracking wouldn't actually work).
I've attached a patch for this.

Regards,
Greg Nancarrow
Fujitsu Australia

Attachments:

v1-0001-Update-pg_stat_stmts-doc.patchapplication/octet-stream; name=v1-0001-Update-pg_stat_stmts-doc.patchDownload
From 7c39f7ca3eb20728d615a93deb8c30effd27ab6d Mon Sep 17 00:00:00 2001
From: Greg Nancarrow <gregn4422@gmail.com>
Date: Tue, 20 Apr 2021 19:40:51 +1000
Subject: [PATCH] Update pg_stat_statements documentation to include
 compute_query_id=on in the typical usage, to enable query identifiers to be
 computed (otherwise tracking is disabled).

---
 doc/src/sgml/pgstatstatements.sgml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml
index e235504e9a..a0c315aa97 100644
--- a/doc/src/sgml/pgstatstatements.sgml
+++ b/doc/src/sgml/pgstatstatements.sgml
@@ -740,6 +740,7 @@
 # postgresql.conf
 shared_preload_libraries = 'pg_stat_statements'
 
+compute_query_id = on
 pg_stat_statements.max = 10000
 pg_stat_statements.track = all
 </programlisting>
-- 
2.27.0

#2Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Greg Nancarrow (#1)
Re: Tiny update to pg_stat_statements documentation

On Tue, Apr 20, 2021 at 3:19 PM Greg Nancarrow <gregn4422@gmail.com> wrote:

Hi,

I noticed that the pg_stat_statements documentation doesn't include
the necessary config parameter setting "compute_query_id = on" in the
"typical usage" (so if you just used those existing typical usage
settings, the tracking wouldn't actually work).
I've attached a patch for this.

+1. How about mentioning something like below?

+compute_query_id = on # when in-core query identifier computation is
desired, otherwise off.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

#3Greg Nancarrow
gregn4422@gmail.com
In reply to: Bharath Rupireddy (#2)
Re: Tiny update to pg_stat_statements documentation

On Tue, Apr 20, 2021 at 8:06 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:

I've attached a patch for this.

+1. How about mentioning something like below?

+compute_query_id = on # when in-core query identifier computation is
desired, otherwise off.

Hmm, I think that comment is perhaps slightly misleading, as
compute_query_id wouldn't be set to "off" in settings for "typical
usage".
Just saying "use in-core query identifier computation" would be a
better comment.
However, I don't think the additional comment is really warranted
here, as the other typical usage settings are not commented, and all
settings are explained in the surrounding documentation.

Regards,
Greg Nancarrow
Fujitsu Australia

#4Michael Paquier
michael@paquier.xyz
In reply to: Greg Nancarrow (#3)
Re: Tiny update to pg_stat_statements documentation

On Wed, Apr 21, 2021 at 11:10:36AM +1000, Greg Nancarrow wrote:

However, I don't think the additional comment is really warranted
here, as the other typical usage settings are not commented, and all
settings are explained in the surrounding documentation.

Good catch, Greg. I agree to keep things simple and just do what you
are suggesting here.
--
Michael

#5Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: Greg Nancarrow (#3)
Re: Tiny update to pg_stat_statements documentation

On Wed, Apr 21, 2021 at 6:40 AM Greg Nancarrow <gregn4422@gmail.com> wrote:

On Tue, Apr 20, 2021 at 8:06 PM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:

I've attached a patch for this.

+1. How about mentioning something like below?

+compute_query_id = on # when in-core query identifier computation is
desired, otherwise off.

Hmm, I think that comment is perhaps slightly misleading, as
compute_query_id wouldn't be set to "off" in settings for "typical
usage".
Just saying "use in-core query identifier computation" would be a
better comment.
However, I don't think the additional comment is really warranted
here, as the other typical usage settings are not commented, and all
settings are explained in the surrounding documentation.

Thanks Greg! I agree with you and withdraw my point.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

#6Julien Rouhaud
rjuju123@gmail.com
In reply to: Michael Paquier (#4)
Re: Tiny update to pg_stat_statements documentation

On Wed, Apr 21, 2021 at 10:27:43AM +0900, Michael Paquier wrote:

On Wed, Apr 21, 2021 at 11:10:36AM +1000, Greg Nancarrow wrote:

However, I don't think the additional comment is really warranted
here, as the other typical usage settings are not commented, and all
settings are explained in the surrounding documentation.

Good catch, Greg.

Agreed!

I agree to keep things simple and just do what you
are suggesting here.

+1, it looks good to me.

#7Michael Paquier
michael@paquier.xyz
In reply to: Julien Rouhaud (#6)
Re: Tiny update to pg_stat_statements documentation

On Wed, Apr 21, 2021 at 09:46:59AM +0800, Julien Rouhaud wrote:

+1, it looks good to me.

Cool, thanks for confirming. The top of the docs have IMO enough
details about the requirements around compute_query_id and third-part
modules, so we are done here.
--
Michael