From 309c64745ea145d7c731e1fe610631b2b84e7e88 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 29 Apr 2012 16:23:54 -0400 Subject: [PATCH] Rename track_iotiming GUC to track_io_timing. This spelling seems significantly more readable to me. --- doc/src/sgml/config.sgml | 9 +++++---- doc/src/sgml/monitoring.sgml | 2 +- doc/src/sgml/pgstatstatements.sgml | 4 ++-- src/backend/storage/buffer/bufmgr.c | 10 +++++----- src/backend/utils/misc/guc.c | 6 +++--- src/backend/utils/misc/postgresql.conf.sample | 2 +- src/include/storage/bufmgr.h | 2 +- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 4728ca5cf4..e58dc18df3 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -4288,10 +4288,10 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv; - - track_iotiming (boolean) + + track_io_timing (boolean) - track_iotiming configuration parameter + track_io_timing configuration parameter @@ -4299,7 +4299,8 @@ 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. Timing information is + measure the overhead of timing on your system. + I/O timing information is displayed in , in the output of when the BUFFERS option is used, and by . Only superusers can diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 8378f039ff..c9e75e4f6f 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -155,7 +155,7 @@ postgres: user database host - The parameter enables monitoring + The parameter enables monitoring of block read and write times. diff --git a/doc/src/sgml/pgstatstatements.sgml b/doc/src/sgml/pgstatstatements.sgml index 1dd42de781..622018e382 100644 --- a/doc/src/sgml/pgstatstatements.sgml +++ b/doc/src/sgml/pgstatstatements.sgml @@ -161,7 +161,7 @@ Total time the statement spent reading blocks, in milliseconds - (if is enabled, otherwise zero) + (if is enabled, otherwise zero) @@ -171,7 +171,7 @@ Total time the statement spent writing blocks, in milliseconds - (if is enabled, otherwise zero) + (if is enabled, otherwise zero) diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index ad5a97a352..2141487475 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -67,7 +67,7 @@ bool zero_damaged_pages = false; int bgwriter_lru_maxpages = 100; double bgwriter_lru_multiplier = 2.0; -bool track_iotiming = false; +bool track_io_timing = false; /* * How many buffers PrefetchBuffer callers should try to stay ahead of their @@ -441,12 +441,12 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, instr_time io_start, io_time; - if (track_iotiming) + if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); smgrread(smgr, forkNum, blockNum, (char *) bufBlock); - if (track_iotiming) + if (track_io_timing) { INSTR_TIME_SET_CURRENT(io_time); INSTR_TIME_SUBTRACT(io_time, io_start); @@ -1938,7 +1938,7 @@ FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln) buf->flags &= ~BM_JUST_DIRTIED; UnlockBufHdr(buf); - if (track_iotiming) + if (track_io_timing) INSTR_TIME_SET_CURRENT(io_start); smgrwrite(reln, @@ -1947,7 +1947,7 @@ FlushBuffer(volatile BufferDesc *buf, SMgrRelation reln) (char *) BufHdrGetBlock(buf), false); - if (track_iotiming) + if (track_io_timing) { INSTR_TIME_SET_CURRENT(io_time); INSTR_TIME_SUBTRACT(io_time, io_start); diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 47a18110c1..d75ab43029 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1019,11 +1019,11 @@ static struct config_bool ConfigureNamesBool[] = NULL, NULL, NULL }, { - {"track_iotiming", PGC_SUSET, STATS_COLLECTOR, - gettext_noop("Collects timing information for database IO activity."), + {"track_io_timing", PGC_SUSET, STATS_COLLECTOR, + gettext_noop("Collects timing statistics for database I/O activity."), NULL }, - &track_iotiming, + &track_io_timing, false, NULL, NULL, NULL }, diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample index 0ac7533beb..8feedc4a19 100644 --- a/src/backend/utils/misc/postgresql.conf.sample +++ b/src/backend/utils/misc/postgresql.conf.sample @@ -425,7 +425,7 @@ #track_activities = on #track_counts = on -#track_iotiming = off +#track_io_timing = off #track_functions = none # none, pl, all #track_activity_query_size = 1024 # (change requires restart) #update_process_title = on diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h index d72bad9f56..17fc7cb942 100644 --- a/src/include/storage/bufmgr.h +++ b/src/include/storage/bufmgr.h @@ -48,7 +48,7 @@ extern PGDLLIMPORT int NBuffers; extern bool zero_damaged_pages; extern int bgwriter_lru_maxpages; extern double bgwriter_lru_multiplier; -extern bool track_iotiming; +extern bool track_io_timing; extern int target_prefetch_pages; /* in buf_init.c */