Home Explore Blog CI



postgresql

4th chunk of `doc/src/sgml/auto-explain.sgml`
7231633b80c8188c936844b6b996919438ec49a4bd74dcb600000001000009bd
 are included in the output.  This parameter is off by default.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-format">
    <term>
     <varname>auto_explain.log_format</varname> (<type>enum</type>)
     <indexterm>
      <primary><varname>auto_explain.log_format</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_format</varname> selects the
      <command>EXPLAIN</command> output format to be used.
      The allowed values are <literal>text</literal>, <literal>xml</literal>,
      <literal>json</literal>, and <literal>yaml</literal>.  The default is text.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-level">
    <term>
     <varname>auto_explain.log_level</varname> (<type>enum</type>)
     <indexterm>
      <primary><varname>auto_explain.log_level</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_level</varname> selects the log level at which
      auto_explain will log the query plan.
      Valid values are <literal>DEBUG5</literal>, <literal>DEBUG4</literal>,
      <literal>DEBUG3</literal>, <literal>DEBUG2</literal>,
      <literal>DEBUG1</literal>, <literal>INFO</literal>,
      <literal>NOTICE</literal>, <literal>WARNING</literal>,
      and <literal>LOG</literal>. The default is <literal>LOG</literal>.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-nested-statements">
    <term>
     <varname>auto_explain.log_nested_statements</varname> (<type>boolean</type>)
     <indexterm>
      <primary><varname>auto_explain.log_nested_statements</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_nested_statements</varname> causes nested
      statements (statements executed inside a function) to be considered
      for logging.  When it is off, only top-level query plans are logged. This
      parameter is off by default. Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-sample-rate">

Title: auto_explain Configuration Parameters in PostgreSQL
Summary
This section details several configuration parameters for the auto_explain module in PostgreSQL. The log_format parameter allows selection of the EXPLAIN output format (text, xml, json, or yaml), with text as the default. The log_level parameter sets the logging level for query plans, ranging from DEBUG5 to LOG, with LOG as the default. The log_nested_statements parameter, when enabled, allows logging of nested statements executed inside functions. All these settings can only be changed by superusers, and they provide fine-grained control over how query execution plans are logged and analyzed in PostgreSQL.