1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

autho_explain: Add GUC to log query parameters

auto_explain.log_parameter_max_length is a new GUC part of the
extension, similar to the corresponding core setting, that controls the
inclusion of query parameters in the logged explain output.

More tests are added to check the behavior of this new parameter: when
parameters logged in full (the default of -1), when disabled (value of
0) and when partially truncated (value different than the two others).

Author: Dagfinn Ilmari Mannsåker
Discussion: https://postgr.es/m/87ee09mohb.fsf@wibble.ilmari.org
This commit is contained in:
Michael Paquier
2022-07-06 09:55:30 +09:00
parent 08385ed261
commit d4bfe41281
5 changed files with 105 additions and 0 deletions

View File

@ -63,6 +63,25 @@ LOAD 'auto_explain';
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>auto_explain.log_parameter_max_length</varname> (<type>integer</type>)
<indexterm>
<primary><varname>auto_explain.log_parameter_max_length</varname> configuration parameter</primary>
</indexterm>
</term>
<listitem>
<para>
<varname>auto_explain.log_parameter_max_length</varname> controls the
logging of query parameter values. A value of<literal>-1</literal> (the
default) logs the parameter values in full. <literal>0</literal> disables
logging of parameter values. A value greater than zero truncates each
parameter value to that many bytes. Only superusers can change this
setting.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<varname>auto_explain.log_analyze</varname> (<type>boolean</type>)