From 644828908fb132ee1f1da5b8b7975c0d73d6158a Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 5 Apr 2012 11:37:31 -0400 Subject: 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. --- doc/src/sgml/config.sgml | 7 +++++-- doc/src/sgml/monitoring.sgml | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 0a5d519214d..81392997f88 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -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 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 , in the output of + when the BUFFERS option is + used, and by . Only superusers can + change this setting. diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 840e54aef8a..013dd335a4a 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -144,6 +144,11 @@ postgres: user database host + + The parameter enables monitoring + of block read and write times. + + The parameter 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 pg_stat_get_db_deadlocks function. + + block_read_time + bigint + Time spent by backends reading data file blocks, in milliseconds. + The same value can be returned in microseconds by directly calling + the pg_stat_get_db_block_time_read function. + + + block_write_time + bigint + Time spent by backends writing data file blocks, in milliseconds. + The same value can be returned in microseconds by directly calling + the pg_stat_get_db_block_time_write function. + stats_reset timestamptz -- cgit v1.2.3