Home Explore Blog CI



postgresql

2nd chunk of `doc/src/sgml/auto-explain.sgml`
e6039d3d6e68f8656e1ac6de0b377adbd5093c77619a06350000000100000fbb
 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 id="auto-explain-configuration-parameters-log-analyze">
    <term>
     <varname>auto_explain.log_analyze</varname> (<type>boolean</type>)
     <indexterm>
      <primary><varname>auto_explain.log_analyze</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_analyze</varname> causes <command>EXPLAIN ANALYZE</command>
      output, rather than just <command>EXPLAIN</command> output, to be printed
      when an execution plan is logged. This parameter is off by default.
      Only superusers can change this setting.
     </para>
     <note>
      <para>
       When this parameter is on, per-plan-node timing occurs for all
       statements executed, whether or not they run long enough to actually
       get logged.  This can have an extremely negative impact on performance.
       Turning off <varname>auto_explain.log_timing</varname> ameliorates the
       performance cost, at the price of obtaining less information.
      </para>
     </note>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-buffers">
    <term>
     <varname>auto_explain.log_buffers</varname> (<type>boolean</type>)
     <indexterm>
      <primary><varname>auto_explain.log_buffers</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_buffers</varname> controls whether buffer
      usage statistics are printed when an execution plan is logged; it's
      equivalent to the <literal>BUFFERS</literal> option of <command>EXPLAIN</command>.
      This parameter has no effect
      unless <varname>auto_explain.log_analyze</varname> is enabled.
      This parameter is off by default.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-wal">
    <term>
     <varname>auto_explain.log_wal</varname> (<type>boolean</type>)
     <indexterm>
      <primary><varname>auto_explain.log_wal</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_wal</varname> controls whether WAL
      usage statistics are printed when an execution plan is logged; it's
      equivalent to the <literal>WAL</literal> option of <command>EXPLAIN</command>.
      This parameter has no effect
      unless <varname>auto_explain.log_analyze</varname> is enabled.
      This parameter is off by default.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-timing">
    <term>
     <varname>auto_explain.log_timing</varname> (<type>boolean</type>)
     <indexterm>
      <primary><varname>auto_explain.log_timing</varname> configuration parameter</primary>
     </indexterm>
    </term>
    <listitem>
     <para>
      <varname>auto_explain.log_timing</varname> controls whether per-node
      timing information is printed when an execution plan is logged; it's
      equivalent to the <literal>TIMING</literal> option of <command>EXPLAIN</command>.
      The overhead of repeatedly reading the system clock can slow down
      queries significantly on some systems, so it may be useful to set this
      parameter to off when only actual row counts, and not exact times, are
      needed.
      This parameter has no effect
      unless <varname>auto_explain.log_analyze</varname> is enabled.
      This parameter is on by default.
      Only superusers can change this setting.
     </para>
    </listitem>
   </varlistentry>

   <varlistentry id="auto-explain-configuration-parameters-log-triggers">

Title: auto_explain Configuration Parameters in PostgreSQL
Summary
This section details several configuration parameters for the auto_explain module in PostgreSQL. These include log_analyze for enabling EXPLAIN ANALYZE output, log_buffers for printing buffer usage statistics, log_wal for showing WAL usage statistics, and log_timing for controlling per-node timing information. Each parameter has specific effects on the execution plan logging process and can be adjusted to balance between detailed query analysis and system performance. Most of these settings require superuser privileges to change and some are dependent on log_analyze being enabled.