public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fujii Masao <[email protected]>
To: [email protected]
Subject: Clarify log_parameter_max_length docs regarding log_min_duration_statement vs log_duration
Date: Fri, 10 Apr 2026 12:00:38 +0900
Message-ID: <CAHGQGwGnCVMVz8-LU9F8Sh57bkQX3jMZzx7age7M0LFEz5=Fog@mail.gmail.com> (raw)
Hi,
While reviewing the log_statement_max_length patch [1], I noticed the docs
for log_parameter_max_length say:
This setting only affects log messages printed as a result of
log_statement, log_duration, and related settings.”
However, enabling only log_duration does not log bind parameter values,
so in practice log_parameter_max_length does not seem to affect messages
generated by log_duration. Bind parameters are logged, for example, when
log_min_duration_statement is set.
Given that, referencing log_duration here seems misleading. Would it be
better to mention log_min_duration_statement instead?
I've attached a patch that makes this change.
Regards,
[1] https://postgr.es/m/CA+E0NR4S+NC6+QHyY_vUuQZMzLhKqczMx-jJVqtjAxF6+=JwAA@mail.gmail.com
--
Fujii Masao
Attachments:
[application/octet-stream] v1-0001-doc-Fix-log_parameter_max_length-docs-to-referenc.patch (1.6K, ../CAHGQGwGnCVMVz8-LU9F8Sh57bkQX3jMZzx7age7M0LFEz5=Fog@mail.gmail.com/2-v1-0001-doc-Fix-log_parameter_max_length-docs-to-referenc.patch)
download | inline diff:
From cc5419679b55b9b375105d88657ef52d41dea3ff Mon Sep 17 00:00:00 2001
From: Fujii Masao <[email protected]>
Date: Fri, 10 Apr 2026 11:04:22 +0900
Subject: [PATCH v1] doc: Fix log_parameter_max_length docs to reference
log_min_duration_statement
The documentation for log_parameter_max_length said it affects messages
generated by log_duration. However, log_duration alone does not log bind
parameter values, so this is misleading.
This commit updates the documentation to reference log_min_duration_statement,
which can log bind parameters, to better reflect actual behavior.
---
doc/src/sgml/config.sgml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index 009295f20e9..88e1c58f352 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -8388,9 +8388,10 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
<para>
This setting only affects log messages printed as a result of
<xref linkend="guc-log-statement"/>,
- <xref linkend="guc-log-duration"/>, and related settings. Non-zero
- values of this setting add some overhead, particularly if parameters
- are sent in binary form, since then conversion to text is required.
+ <xref linkend="guc-log-min-duration-statement"/>, and related settings.
+ Non-zero values of this setting add some overhead, particularly
+ if parameters are sent in binary form, since then conversion to
+ text is required.
</para>
</listitem>
</varlistentry>
--
2.51.2
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Clarify log_parameter_max_length docs regarding log_min_duration_statement vs log_duration
In-Reply-To: <CAHGQGwGnCVMVz8-LU9F8Sh57bkQX3jMZzx7age7M0LFEz5=Fog@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox