static bool auto_explain_log_analyze = false;
static bool auto_explain_log_verbose = false;
static bool auto_explain_log_buffers = false;
+static bool auto_explain_log_io = false;
static bool auto_explain_log_wal = false;
static bool auto_explain_log_triggers = false;
static bool auto_explain_log_timing = true;
NULL,
NULL);
+ DefineCustomBoolVariable("auto_explain.log_io",
+ "Log I/O statistics.",
+ NULL,
+ &auto_explain_log_io,
+ false,
+ PGC_SUSET,
+ 0,
+ NULL,
+ NULL,
+ NULL);
+
DefineCustomBoolVariable("auto_explain.log_wal",
"Log WAL usage.",
NULL,
queryDesc->instrument_options |= INSTRUMENT_ROWS;
if (auto_explain_log_buffers)
queryDesc->instrument_options |= INSTRUMENT_BUFFERS;
+ if (auto_explain_log_io)
+ queryDesc->instrument_options |= INSTRUMENT_IO;
if (auto_explain_log_wal)
queryDesc->instrument_options |= INSTRUMENT_WAL;
}
es->analyze = (queryDesc->instrument_options && auto_explain_log_analyze);
es->verbose = auto_explain_log_verbose;
es->buffers = (es->analyze && auto_explain_log_buffers);
+ es->io = (es->analyze && auto_explain_log_io);
es->wal = (es->analyze && auto_explain_log_wal);
es->timing = (es->analyze && auto_explain_log_timing);
es->summary = es->analyze;
</listitem>
</varlistentry>
+ <varlistentry id="auto-explain-configuration-parameters-log-io">
+ <term>
+ <varname>auto_explain.log_io</varname> (<type>boolean</type>)
+ <indexterm>
+ <primary><varname>auto_explain.log_io</varname> configuration parameter</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ <varname>auto_explain.log_io</varname> controls whether I/O usage
+ statistics are printed when an execution plan is logged; it's
+ equivalent to the <literal>IO</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>)