aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2012-03-27 14:52:37 -0400
committerRobert Haas <rhaas@postgresql.org>2012-03-27 14:55:02 -0400
commit40b9b957694cf7749c420c6c51a7e1d3c9b1fec1 (patch)
treeab94826c3e20f7fe0a63edb3370be8a8988fd31f /src/backend/executor
parent98316e211b60cb160247171e3557b40a247c4610 (diff)
downloadpostgresql-40b9b957694cf7749c420c6c51a7e1d3c9b1fec1.tar.gz
postgresql-40b9b957694cf7749c420c6c51a7e1d3c9b1fec1.zip
New GUC, track_iotiming, to track I/O timings.
Currently, the only way to see the numbers this gathers is via EXPLAIN (ANALYZE, BUFFERS), but the plan is to add visibility through the stats collector and pg_stat_statements in subsequent patches. Ants Aasma, reviewed by Greg Smith, with some further changes by me.
Diffstat (limited to 'src/backend/executor')
-rw-r--r--src/backend/executor/instrument.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/executor/instrument.c b/src/backend/executor/instrument.c
index 6e9f450d688..92e56d13ae6 100644
--- a/src/backend/executor/instrument.c
+++ b/src/backend/executor/instrument.c
@@ -145,4 +145,6 @@ BufferUsageAccumDiff(BufferUsage *dst,
dst->local_blks_written += add->local_blks_written - sub->local_blks_written;
dst->temp_blks_read += add->temp_blks_read - sub->temp_blks_read;
dst->temp_blks_written += add->temp_blks_written - sub->temp_blks_written;
+ INSTR_TIME_ACCUM_DIFF(dst->time_read, add->time_read, sub->time_read);
+ INSTR_TIME_ACCUM_DIFF(dst->time_write, add->time_write, sub->time_write);
}