mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Expose track_iotiming data via the statistics collector.
Ants Aasma's original patch to add timing information for buffer I/O requests exposed this data at the relation level, which was judged too costly. I've here exposed it at the database level instead.
This commit is contained in:
@ -4295,8 +4295,11 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
|
||||
default, because it will repeatedly query the operating system for
|
||||
the current time, which may cause significant overhead on some
|
||||
platforms. You can use the <xref linkend="pgtesttiming"> tool to
|
||||
measure the overhead of timing on your system. Only superusers can
|
||||
change this setting.
|
||||
measure the overhead of timing on your system. Timing information is
|
||||
displayed in <xref linkend="pg-stat-database-view">, in the output of
|
||||
<xref linkend="sql-explain"> when the <literal>BUFFERS</> option is
|
||||
used, and by <xref linkend="pgstatstatements">. Only superusers can
|
||||
change this setting.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
@ -144,6 +144,11 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
|
||||
statistics are collected about table and index accesses.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The parameter <xref linkend="guc-track-iotiming"> enables monitoring
|
||||
of block read and write times.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
The parameter <xref linkend="guc-track-functions"> enables tracking of
|
||||
usage of user-defined functions.
|
||||
@ -961,6 +966,20 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
|
||||
This value can also be returned by directly calling
|
||||
the <function>pg_stat_get_db_deadlocks</function> function.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>block_read_time</entry>
|
||||
<entry><type>bigint</></entry>
|
||||
<entry>Time spent by backends reading data file blocks, in milliseconds.
|
||||
The same value can be returned in microseconds by directly calling
|
||||
the <function>pg_stat_get_db_block_time_read</function> function.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>block_write_time</entry>
|
||||
<entry><type>bigint</></entry>
|
||||
<entry>Time spent by backends writing data file blocks, in milliseconds.
|
||||
The same value can be returned in microseconds by directly calling
|
||||
the <function>pg_stat_get_db_block_time_write</function> function.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>stats_reset</entry>
|
||||
<entry><type>timestamptz</></entry>
|
||||
|
Reference in New Issue
Block a user