mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Emit parameter values during query bind/execute errors
This makes such log entries more useful, since the cause of the error can be dependent on the parameter values. Author: Alexey Bashtanov, Álvaro Herrera Discussion: https://postgr.es/m/0146a67b-a22a-0519-9082-bc29756b93a2@imap.cc Reviewed-by: Peter Eisentraut, Andres Freund, Tom Lane
This commit is contained in:
@ -6595,6 +6595,29 @@ log_line_prefix = '%m [%p] %q%u@%d/%a '
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-log-parameters-on-error" xreflabel="log_parameters_on_error">
|
||||
<term><varname>log_parameters_on_error</varname> (<type>boolean</type>)
|
||||
<indexterm>
|
||||
<primary><varname>log_parameters_on_error</varname> configuration parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Controls whether bind parameters are logged when a statement is logged
|
||||
as a result of <xref linkend="guc-log-min-error-statement"/>.
|
||||
It adds some overhead, as postgres will compute and store textual
|
||||
representations of parameter values in memory for all statements,
|
||||
even if they eventually do not get logged.
|
||||
This setting has no effect on statements logged due to
|
||||
<xref linkend="guc-log-min-duration-statement"/> or
|
||||
<xref linkend="guc-log-statement"/> settings, as they are always logged
|
||||
with parameters.
|
||||
The default is <literal>off</literal>.
|
||||
Only superusers can change this setting.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-log-statement" xreflabel="log_statement">
|
||||
<term><varname>log_statement</varname> (<type>enum</type>)
|
||||
<indexterm>
|
||||
|
Reference in New Issue
Block a user