Track IO times in pg_stat_io
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +59 −0 |
| src/backend/catalog/system_views.sql | modified | +4 −0 |
| src/backend/storage/buffer/bufmgr.c | modified | +19 −47 |
| src/backend/storage/buffer/localbuf.c | modified | +12 −19 |
| src/backend/storage/smgr/md.c | modified | +20 −11 |
| src/backend/utils/activity/pgstat_io.c | modified | +87 −20 |
| src/backend/utils/adt/pgstatfuncs.c | modified | +59 −5 |
| src/include/catalog/pg_proc.dat | modified | +3 −3 |
| src/include/pgstat.h | modified | +6 −1 |
| src/test/regress/expected/rules.out | modified | +5 −1 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Documentation touched
Discussion
Cited messages not in the archive:
flat/CAAKRu_ay5iKmnbXZ3DsauViF3eMxu4m1oNnJXqV_HyqYeg55Ww@mail.gmail.com