docs: Reframe track_io_timing related docs as wait time

With AIO it does not make sense anymore to track the time for each individual
IO, as multiple IOs can be in-flight at the same time. Instead we now track
the time spent *waiting* for IOs.

This should be reflected in the docs. While, so far, we only do a subset of
reads, and no other operations, via AIO, describing the GUC and view columns
as measuring IO waits is accurate for synchronous and asynchronous IO.

Reviewed-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/5dzyoduxlvfg55oqtjyjehez5uoq6hnwgzor4kkybkfdgkj7ag@rbi4gsmzaczk
This commit is contained in:
Andres Freund 2025-03-30 18:04:40 -04:00
parent 12ce89fd07
commit b27f8637ea
2 changed files with 8 additions and 8 deletions

View File

@ -8568,7 +8568,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
</term> </term>
<listitem> <listitem>
<para> <para>
Enables timing of database I/O calls. This parameter is off by Enables timing of database I/O waits. This parameter is off by
default, as it will repeatedly query the operating system for default, as it will repeatedly query the operating system for
the current time, which may cause significant overhead on some the current time, which may cause significant overhead on some
platforms. You can use the <xref linkend="pgtesttiming"/> tool to platforms. You can use the <xref linkend="pgtesttiming"/> tool to
@ -8602,7 +8602,7 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
</term> </term>
<listitem> <listitem>
<para> <para>
Enables timing of WAL I/O calls. This parameter is off by default, Enables timing of WAL I/O waits. This parameter is off by default,
as it will repeatedly query the operating system for the current time, as it will repeatedly query the operating system for the current time,
which may cause significant overhead on some platforms. which may cause significant overhead on some platforms.
You can use the <application>pg_test_timing</application> tool to You can use the <application>pg_test_timing</application> tool to

View File

@ -2747,7 +2747,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>read_time</structfield> <type>double precision</type> <structfield>read_time</structfield> <type>double precision</type>
</para> </para>
<para> <para>
Time spent in read operations in milliseconds (if Time spent waiting for read operations in milliseconds (if
<xref linkend="guc-track-io-timing"/> is enabled and <xref linkend="guc-track-io-timing"/> is enabled and
<varname>object</varname> is not <literal>wal</literal>, <varname>object</varname> is not <literal>wal</literal>,
or if <xref linkend="guc-track-wal-io-timing"/> is enabled or if <xref linkend="guc-track-wal-io-timing"/> is enabled
@ -2785,7 +2785,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>write_time</structfield> <type>double precision</type> <structfield>write_time</structfield> <type>double precision</type>
</para> </para>
<para> <para>
Time spent in write operations in milliseconds (if Time spent waiting for write operations in milliseconds (if
<xref linkend="guc-track-io-timing"/> is enabled and <xref linkend="guc-track-io-timing"/> is enabled and
<varname>object</varname> is not <literal>wal</literal>, <varname>object</varname> is not <literal>wal</literal>,
or if <xref linkend="guc-track-wal-io-timing"/> is enabled or if <xref linkend="guc-track-wal-io-timing"/> is enabled
@ -2813,7 +2813,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>writeback_time</structfield> <type>double precision</type> <structfield>writeback_time</structfield> <type>double precision</type>
</para> </para>
<para> <para>
Time spent in writeback operations in milliseconds (if Time spent waiting for writeback operations in milliseconds (if
<xref linkend="guc-track-io-timing"/> is enabled, otherwise zero). This <xref linkend="guc-track-io-timing"/> is enabled, otherwise zero). This
includes the time spent queueing write-out requests and, potentially, includes the time spent queueing write-out requests and, potentially,
the time spent to write out the dirty data. the time spent to write out the dirty data.
@ -2849,7 +2849,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>extend_time</structfield> <type>double precision</type> <structfield>extend_time</structfield> <type>double precision</type>
</para> </para>
<para> <para>
Time spent in extend operations in milliseconds. (if Time spent waiting for extend operations in milliseconds. (if
<xref linkend="guc-track-io-timing"/> is enabled and <xref linkend="guc-track-io-timing"/> is enabled and
<varname>object</varname> is not <literal>wal</literal>, <varname>object</varname> is not <literal>wal</literal>,
or if <xref linkend="guc-track-wal-io-timing"/> is enabled or if <xref linkend="guc-track-wal-io-timing"/> is enabled
@ -2923,7 +2923,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<structfield>fsync_time</structfield> <type>double precision</type> <structfield>fsync_time</structfield> <type>double precision</type>
</para> </para>
<para> <para>
Time spent in fsync operations in milliseconds (if Time spent waiting for fsync operations in milliseconds (if
<xref linkend="guc-track-io-timing"/> is enabled and <xref linkend="guc-track-io-timing"/> is enabled and
<varname>object</varname> is not <literal>wal</literal>, <varname>object</varname> is not <literal>wal</literal>,
or if <xref linkend="guc-track-wal-io-timing"/> is enabled or if <xref linkend="guc-track-wal-io-timing"/> is enabled
@ -3010,7 +3010,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage
<note> <note>
<para> <para>
Columns tracking I/O time will only be non-zero when Columns tracking I/O wait time will only be non-zero when
<xref linkend="guc-track-io-timing"/> is enabled. The user should be <xref linkend="guc-track-io-timing"/> is enabled. The user should be
careful when referencing these columns in combination with their careful when referencing these columns in combination with their
corresponding I/O operations in case <varname>track_io_timing</varname> corresponding I/O operations in case <varname>track_io_timing</varname>