pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed[PATCH v2 01/12] Clean up docs for log_statement_sample_rate..
6+ messages / 5 participants
[nested] [flat]
* [PATCH v2 01/12] Clean up docs for log_statement_sample_rate..
@ 2019-03-28 13:53 Justin Pryzby <pryzbyj@telsasoft.com>
0 siblings, 0 replies; 6+ messages in thread
From: Justin Pryzby @ 2019-03-28 13:53 UTC (permalink / raw)
..which was added at commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d
And this one little bit was missed here:
https://www.postgresql.org/message-id/20190403215938.GA26375%40alvherre.pgsql
Author: Christoph Berg <myon@debian.org>
---
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 804406a..ad5a620 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5887,7 +5887,7 @@ local0.* /var/log/postgresql
<para>
Determines the fraction of statements that exceed
<xref linkend="guc-log-min-duration-statement"/> to be logged.
- The default is <literal>1</literal>, meaning log all such
+ The default is <literal>1.0</literal>, meaning log all such
statements.
Setting this to zero disables logging by duration, same as setting
<varname>log_min_duration_statement</varname> to
--
2.1.4
--u65IjBhB3TIa72Vp
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v2-0002-review-docs-for-pg12dev.patch"
^ permalink raw reply [nested|flat] 6+ messages in thread
* [PATCH v1 1/8] Clean up docs for log_statement_sample_rate..
@ 2019-03-28 13:53 Justin Pryzby <pryzbyj@telsasoft.com>
0 siblings, 0 replies; 6+ messages in thread
From: Justin Pryzby @ 2019-03-28 13:53 UTC (permalink / raw)
..which was added at commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d
---
doc/src/sgml/config.sgml | 18 +++++++++---------
src/backend/utils/misc/guc.c | 4 ++--
src/backend/utils/misc/postgresql.conf.sample | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d383de2..9b66e7f 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5786,9 +5786,9 @@ local0.* /var/log/postgresql
Causes the duration of each completed statement to be logged
if the statement ran for at least the specified number of
milliseconds, modulated by <varname>log_statement_sample_rate</varname>.
- Setting this to zero prints all statement durations. Minus-one (the default)
- disables logging statement durations. For example, if you set it to
- <literal>250ms</literal> then all SQL statements that run 250ms or longer
+ Setting this to zero prints all statement durations. <literal>-1</literal> (the default)
+ disables logging statements due to exceeding duration threshold. For example, if you set it to
+ <literal>250ms</literal>, then all SQL statements that run 250ms or longer
will be logged. Enabling this parameter can be helpful in tracking down
unoptimized queries in your applications.
Only superusers can change this setting.
@@ -5824,13 +5824,13 @@ local0.* /var/log/postgresql
</term>
<listitem>
<para>
- Determines the fraction of the statements that exceed
- <xref linkend="guc-log-min-duration-statement"/> which to log.
- The default is <literal>1</literal>, meaning log to all such
+ Determines the fraction of statements that exceed
+ <xref linkend="guc-log-min-duration-statement"/> to be logged.
+ The default is <literal>1.0</literal>, meaning log all such
statements.
- Setting this to zero disables logging, same as setting
+ Setting this to zero disables logging by duration, same as setting
<varname>log_min_duration_statement</varname>
- to minus-one. <varname>log_statement_sample_rate</varname>
+ to <literal>-1</literal>. <varname>log_statement_sample_rate</varname>
is helpful when the traffic is too high to log all queries.
</para>
</listitem>
@@ -6083,7 +6083,7 @@ local0.* /var/log/postgresql
<note>
<para>
- The difference between setting this option and setting
+ The difference between enabling <varname>log_duration</varname> and setting
<xref linkend="guc-log-min-duration-statement"/> to zero is that
exceeding <varname>log_min_duration_statement</varname> forces the text of
the query to be logged, but this option doesn't. Thus, if
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index aa564d1..415cd78 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3357,8 +3357,8 @@ static struct config_real ConfigureNamesReal[] =
{
{"log_statement_sample_rate", PGC_SUSET, LOGGING_WHEN,
- gettext_noop("Fraction of statements over log_min_duration_statement to log."),
- gettext_noop("If you only want a sample, use a value between 0 (never "
+ gettext_noop("Fraction of statements exceeding log_min_duration_statement to be logged."),
+ gettext_noop("If you only want a sample, use a value between 0.0 (never "
"log) and 1.0 (always log).")
},
&log_statement_sample_rate,
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index cccb5f1..684f5e7 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -489,9 +489,9 @@
# 0 logs all statement, > 0 logs only statements running at
# least this number of milliseconds.
-#log_statement_sample_rate = 1 # Fraction of logged statements over
- # log_min_duration_statement. 1.0 logs all statements,
- # 0 never logs.
+#log_statement_sample_rate = 1.0 # Fraction of logged statements exceeding
+ # log_min_duration_statement to be logged
+ # 1.0 logs all statements, 0.0 never logs
# - What to Log -
--
2.1.4
--IMjqdzrDRly81ofr
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v1-0002-review-docs-for-pg12dev.patch"
^ permalink raw reply [nested|flat] 6+ messages in thread
* clean up docs for log_statement_sample_rate
@ 2019-03-28 13:59 Justin Pryzby <pryzby@telsasoft.com>
2019-03-28 14:02 ` Re: clean up docs for log_statement_sample_rate Christoph Berg <myon@debian.org>
2019-03-28 14:56 ` Re: clean up docs for log_statement_sample_rate Adrien NAYRAT <adrien.nayrat@anayrat.info>
2019-04-03 21:59 ` Re: clean up docs for log_statement_sample_rate Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 3 replies; 6+ messages in thread
From: Justin Pryzby @ 2019-03-28 13:59 UTC (permalink / raw)
To: pgsql-hackers; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Adrien NAYRAT <adrien.nayrat@anayrat.info>; Christoph Berg <myon@debian.org>
Following the dicussion here,
https://www.postgresql.org/message-id/flat/CAD21AoB9%2By8N4%2BFan-ne-_7J5yTybPttxeVKfwUocKp4zT1vNQ%4...
I'm proposing these changes to clean up docs for previous (more or less
unrelated) commit.
From 15d42c5a8f2f811a7add3e4179edcc1f7cd291f7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 28 Mar 2019 08:53:26 -0500
Subject: [PATCH v1] Clean up docs for log_statement_sample_rate..
..which was added at commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d
---
doc/src/sgml/config.sgml | 18 +++++++++---------
src/backend/utils/misc/guc.c | 4 ++--
src/backend/utils/misc/postgresql.conf.sample | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d383de2..4019a31 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5786,9 +5786,9 @@ local0.* /var/log/postgresql
Causes the duration of each completed statement to be logged
if the statement ran for at least the specified number of
milliseconds, modulated by <varname>log_statement_sample_rate</varname>.
- Setting this to zero prints all statement durations. Minus-one (the default)
- disables logging statement durations. For example, if you set it to
- <literal>250ms</literal> then all SQL statements that run 250ms or longer
+ Setting this to zero prints all statement durations. <literal>-1</literal> (the default)
+ disables logging statements due to exceeding duration threshold. For example, if you set it to
+ <literal>250ms</literal>, then all SQL statements that run 250ms or longer
will be logged. Enabling this parameter can be helpful in tracking down
unoptimized queries in your applications.
Only superusers can change this setting.
@@ -5824,13 +5824,13 @@ local0.* /var/log/postgresql
</term>
<listitem>
<para>
- Determines the fraction of the statements that exceed
- <xref linkend="guc-log-min-duration-statement"/> which to log.
- The default is <literal>1</literal>, meaning log to all such
+ Determines the fraction of statements that exceed
+ <xref linkend="guc-log-min-duration-statement"/> to be logged.
+ The default is <literal>1</literal>, meaning log all such
statements.
- Setting this to zero disables logging, same as setting
+ Setting this to zero disables logging by duration, same as setting
<varname>log_min_duration_statement</varname>
- to minus-one. <varname>log_statement_sample_rate</varname>
+ to <literal>-1</literal>. <varname>log_statement_sample_rate</varname>
is helpful when the traffic is too high to log all queries.
</para>
</listitem>
@@ -6083,7 +6083,7 @@ local0.* /var/log/postgresql
<note>
<para>
- The difference between setting this option and setting
+ The difference between enabling <varname>log_duration</varname> and setting
<xref linkend="guc-log-min-duration-statement"/> to zero is that
exceeding <varname>log_min_duration_statement</varname> forces the text of
the query to be logged, but this option doesn't. Thus, if
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index aa564d1..415cd78 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3357,8 +3357,8 @@ static struct config_real ConfigureNamesReal[] =
{
{"log_statement_sample_rate", PGC_SUSET, LOGGING_WHEN,
- gettext_noop("Fraction of statements over log_min_duration_statement to log."),
- gettext_noop("If you only want a sample, use a value between 0 (never "
+ gettext_noop("Fraction of statements exceeding log_min_duration_statement to be logged."),
+ gettext_noop("If you only want a sample, use a value between 0.0 (never "
"log) and 1.0 (always log).")
},
&log_statement_sample_rate,
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index cccb5f1..684f5e7 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -489,9 +489,9 @@
# 0 logs all statement, > 0 logs only statements running at
# least this number of milliseconds.
-#log_statement_sample_rate = 1 # Fraction of logged statements over
- # log_min_duration_statement. 1.0 logs all statements,
- # 0 never logs.
+#log_statement_sample_rate = 1.0 # Fraction of logged statements exceeding
+ # log_min_duration_statement to be logged
+ # 1.0 logs all statements, 0.0 never logs
# - What to Log -
Attachments:
[text/x-diff] v1-0001-Clean-up-docs-for-log_statement_sample_rate.patch (4.5K, ../../20190328135918.GA27808@telsasoft.com/2-v1-0001-Clean-up-docs-for-log_statement_sample_rate.patch)
download | inline diff:
From 15d42c5a8f2f811a7add3e4179edcc1f7cd291f7 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Thu, 28 Mar 2019 08:53:26 -0500
Subject: [PATCH v1] Clean up docs for log_statement_sample_rate..
..which was added at commit 88bdbd3f746049834ae3cc972e6e650586ec3c9d
---
doc/src/sgml/config.sgml | 18 +++++++++---------
src/backend/utils/misc/guc.c | 4 ++--
src/backend/utils/misc/postgresql.conf.sample | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index d383de2..4019a31 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -5786,9 +5786,9 @@ local0.* /var/log/postgresql
Causes the duration of each completed statement to be logged
if the statement ran for at least the specified number of
milliseconds, modulated by <varname>log_statement_sample_rate</varname>.
- Setting this to zero prints all statement durations. Minus-one (the default)
- disables logging statement durations. For example, if you set it to
- <literal>250ms</literal> then all SQL statements that run 250ms or longer
+ Setting this to zero prints all statement durations. <literal>-1</literal> (the default)
+ disables logging statements due to exceeding duration threshold. For example, if you set it to
+ <literal>250ms</literal>, then all SQL statements that run 250ms or longer
will be logged. Enabling this parameter can be helpful in tracking down
unoptimized queries in your applications.
Only superusers can change this setting.
@@ -5824,13 +5824,13 @@ local0.* /var/log/postgresql
</term>
<listitem>
<para>
- Determines the fraction of the statements that exceed
- <xref linkend="guc-log-min-duration-statement"/> which to log.
- The default is <literal>1</literal>, meaning log to all such
+ Determines the fraction of statements that exceed
+ <xref linkend="guc-log-min-duration-statement"/> to be logged.
+ The default is <literal>1</literal>, meaning log all such
statements.
- Setting this to zero disables logging, same as setting
+ Setting this to zero disables logging by duration, same as setting
<varname>log_min_duration_statement</varname>
- to minus-one. <varname>log_statement_sample_rate</varname>
+ to <literal>-1</literal>. <varname>log_statement_sample_rate</varname>
is helpful when the traffic is too high to log all queries.
</para>
</listitem>
@@ -6083,7 +6083,7 @@ local0.* /var/log/postgresql
<note>
<para>
- The difference between setting this option and setting
+ The difference between enabling <varname>log_duration</varname> and setting
<xref linkend="guc-log-min-duration-statement"/> to zero is that
exceeding <varname>log_min_duration_statement</varname> forces the text of
the query to be logged, but this option doesn't. Thus, if
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index aa564d1..415cd78 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -3357,8 +3357,8 @@ static struct config_real ConfigureNamesReal[] =
{
{"log_statement_sample_rate", PGC_SUSET, LOGGING_WHEN,
- gettext_noop("Fraction of statements over log_min_duration_statement to log."),
- gettext_noop("If you only want a sample, use a value between 0 (never "
+ gettext_noop("Fraction of statements exceeding log_min_duration_statement to be logged."),
+ gettext_noop("If you only want a sample, use a value between 0.0 (never "
"log) and 1.0 (always log).")
},
&log_statement_sample_rate,
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index cccb5f1..684f5e7 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -489,9 +489,9 @@
# 0 logs all statement, > 0 logs only statements running at
# least this number of milliseconds.
-#log_statement_sample_rate = 1 # Fraction of logged statements over
- # log_min_duration_statement. 1.0 logs all statements,
- # 0 never logs.
+#log_statement_sample_rate = 1.0 # Fraction of logged statements exceeding
+ # log_min_duration_statement to be logged
+ # 1.0 logs all statements, 0.0 never logs
# - What to Log -
--
2.1.4
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: clean up docs for log_statement_sample_rate
2019-03-28 13:59 clean up docs for log_statement_sample_rate Justin Pryzby <pryzby@telsasoft.com>
@ 2019-03-28 14:02 ` Christoph Berg <myon@debian.org>
2 siblings, 0 replies; 6+ messages in thread
From: Christoph Berg @ 2019-03-28 14:02 UTC (permalink / raw)
To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers@postgresql.org, Alvaro Herrera <alvherre@alvh.no-ip.org>; Adrien NAYRAT <adrien.nayrat@anayrat.info>
Re: Justin Pryzby 2019-03-28 <20190328135918.GA27808@telsasoft.com>
> + Determines the fraction of statements that exceed
> + <xref linkend="guc-log-min-duration-statement"/> to be logged.
> + The default is <literal>1</literal>, meaning log all such
^ 1.0
Thanks for taking care of this!
Christoph
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: clean up docs for log_statement_sample_rate
2019-03-28 13:59 clean up docs for log_statement_sample_rate Justin Pryzby <pryzby@telsasoft.com>
@ 2019-03-28 14:56 ` Adrien NAYRAT <adrien.nayrat@anayrat.info>
2 siblings, 0 replies; 6+ messages in thread
From: Adrien NAYRAT @ 2019-03-28 14:56 UTC (permalink / raw)
To: Justin Pryzby <pryzby@telsasoft.com>; pgsql-hackers; +Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>; Christoph Berg <myon@debian.org>
On 3/28/19 2:59 PM, Justin Pryzby wrote:
> Following the dicussion here,
> https://www.postgresql.org/message-id/flat/CAD21AoB9%2By8N4%2BFan-ne-_7J5yTybPttxeVKfwUocKp4zT1vNQ%4...
>
> I'm proposing these changes to clean up docs for previous (more or less
> unrelated) commit.
I intended to fix misusage of mixing 0 and 1.0. I will be more careful.
Thanks for taking the point and other fixes!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: clean up docs for log_statement_sample_rate
2019-03-28 13:59 clean up docs for log_statement_sample_rate Justin Pryzby <pryzby@telsasoft.com>
@ 2019-04-03 21:59 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2 siblings, 0 replies; 6+ messages in thread
From: Alvaro Herrera @ 2019-04-03 21:59 UTC (permalink / raw)
To: Justin Pryzby <pryzby@telsasoft.com>; +Cc: pgsql-hackers@postgresql.org, Adrien NAYRAT <adrien.nayrat@anayrat.info>; Christoph Berg <myon@debian.org>
On 2019-Mar-28, Justin Pryzby wrote:
> Following the dicussion here,
> https://www.postgresql.org/message-id/flat/CAD21AoB9%2By8N4%2BFan-ne-_7J5yTybPttxeVKfwUocKp4zT1vNQ%4...
>
> I'm proposing these changes to clean up docs for previous (more or less
> unrelated) commit.
Thanks, pushed.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2019-04-03 21:59 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 13:53 [PATCH v2 01/12] Clean up docs for log_statement_sample_rate.. Justin Pryzby <pryzbyj@telsasoft.com>
2019-03-28 13:53 [PATCH v1 1/8] Clean up docs for log_statement_sample_rate.. Justin Pryzby <pryzbyj@telsasoft.com>
2019-03-28 13:59 clean up docs for log_statement_sample_rate Justin Pryzby <pryzby@telsasoft.com>
2019-03-28 14:02 ` Re: clean up docs for log_statement_sample_rate Christoph Berg <myon@debian.org>
2019-03-28 14:56 ` Re: clean up docs for log_statement_sample_rate Adrien NAYRAT <adrien.nayrat@anayrat.info>
2019-04-03 21:59 ` Re: clean up docs for log_statement_sample_rate Alvaro Herrera <alvherre@2ndquadrant.com>
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