pgsql: Track IO times in pg_stat_io
От | Andres Freund |
---|---|
Тема | pgsql: Track IO times in pg_stat_io |
Дата | |
Msg-id | E1pkw94-001wgX-Jn@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Track IO times in pg_stat_io a9c70b46dbe and 8aaa04b32S added counting of IO operations to a new view, pg_stat_io. Now, add IO timing for reads, writes, extends, and fsyncs to pg_stat_io as well. This combines the tracking for pgBufferUsage with the tracking for pg_stat_io into a new function pgstat_count_io_op_time(). This should make it a bit easier to avoid the somewhat costly instr_time conversion done for pgBufferUsage. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Andres Freund <andres@anarazel.de> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://postgr.es/m/flat/CAAKRu_ay5iKmnbXZ3DsauViF3eMxu4m1oNnJXqV_HyqYeg55Ww%40mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/ac8d53dae5ae2914aeb022dc514826f71c7206e6 Modified Files -------------- doc/src/sgml/monitoring.sgml | 59 ++++++++++++++++++ src/backend/catalog/system_views.sql | 4 ++ src/backend/storage/buffer/bufmgr.c | 66 ++++++-------------- src/backend/storage/buffer/localbuf.c | 31 ++++------ src/backend/storage/smgr/md.c | 31 ++++++---- src/backend/utils/activity/pgstat_io.c | 107 +++++++++++++++++++++++++++------ src/backend/utils/adt/pgstatfuncs.c | 64 ++++++++++++++++++-- src/include/catalog/pg_proc.dat | 6 +- src/include/pgstat.h | 7 ++- src/test/regress/expected/rules.out | 6 +- src/tools/pgindent/typedefs.list | 1 + 11 files changed, 275 insertions(+), 107 deletions(-)
В списке pgsql-committers по дате отправления: