From 40b9b957694cf7749c420c6c51a7e1d3c9b1fec1 Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Tue, 27 Mar 2012 14:52:37 -0400 Subject: 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. --- src/backend/utils/misc/guc.c | 9 +++++++++ src/backend/utils/misc/postgresql.conf.sample | 1 + 2 files changed, 10 insertions(+) (limited to 'src/backend/utils') diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 3d2fe3ebc87..8ea391a8e6c 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1018,6 +1018,15 @@ static struct config_bool ConfigureNamesBool[] = true, NULL, NULL, NULL }, + { + {"track_iotiming", PGC_SUSET, STATS_COLLECTOR, + gettext_noop("Collects timing information for database IO activity."), + NULL + }, + &track_iotiming, + false, + NULL, NULL, NULL + }, { {"update_process_title", PGC_SUSET, STATS_COLLECTOR, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 96da086b0f4..cbae3bfb228 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -424,6 +424,7 @@ #track_activities = on #track_counts = on +#track_iotiming = off #track_functions = none # none, pl, all #track_activity_query_size = 1024 # (change requires restart) #update_process_title = on -- cgit v1.2.3