From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Track IO times in pg_stat_io |
Date: | 2023-04-08 00:09:31 |
Message-ID: | E1pkw94-001wgX-Jn@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)gmail(dot)com>
Reviewed-by: Andres Freund <andres(at)anarazel(dot)de>
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2023-04-08 01:33:17 | pgsql: Pacify perlcritic. |
Previous Message | Peter Geoghegan | 2023-04-07 23:46:50 | pgsql: Show more detail in nbtree rmgr descriptions. |