pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: pgstat: Track more detailed relation IO statistics
2+ messages / 2 participants
[nested] [flat]
* pgsql: pgstat: Track more detailed relation IO statistics
@ 2023-02-10 06:24 Andres Freund <andres@anarazel.de>
0 siblings, 1 reply; 2+ messages in thread
From: Andres Freund @ 2023-02-10 06:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
pgstat: Track more detailed relation IO statistics
Commit 28e626bde00 introduced the infrastructure for tracking more detailed IO
statistics. This commit adds the actual collection of the new IO statistics
for relations and temporary relations. See aforementioned commit for goals and
high-level design.
The changes in this commit are fairly straight-forward. The bulk of the change
is to passing sufficient information to the callsites of pgstat_count_io_op().
A somewhat unsightly detail is that it currently is hard to find a better
place to count fsyncs than in md.c, whereas the other pgstat_count_io_op()
calls are in bufmgr.c/localbuf.c. As the number of fsyncs is tied to md.c
implementation details, it's not obvious there is a better answer.
Author: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/20200124195226.lth52iydq2n2uilq@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f30d62c2fc60acfa62d3b83a73dc9bf7f83cfe2f
Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 110 +++++++++++++++++++++++++++++-----
src/backend/storage/buffer/freelist.c | 58 +++++++++++++-----
src/backend/storage/buffer/localbuf.c | 13 +++-
src/backend/storage/smgr/md.c | 24 ++++++++
src/include/storage/buf_internals.h | 8 ++-
src/include/storage/bufmgr.h | 7 ++-
6 files changed, 184 insertions(+), 36 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql: pgstat: Track more detailed relation IO statistics
@ 2023-02-10 14:23 Robert Haas <robertmhaas@gmail.com>
parent: Andres Freund <andres@anarazel.de>
0 siblings, 0 replies; 2+ messages in thread
From: Robert Haas @ 2023-02-10 14:23 UTC (permalink / raw)
To: Andres Freund <andres@anarazel.de>; +Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
On Fri, Feb 10, 2023 at 1:24 AM Andres Freund <andres@anarazel.de> wrote:
> pgstat: Track more detailed relation IO statistics
I assume there's more commits coming here, but for the record, the
previous patch introduced a reference to pg_stat_io in the
documentation, but just a brief reference and not full details. This
patch introduced a reference to it in the comments. But it doesn't
actually exist yet.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-02-10 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 06:24 pgsql: pgstat: Track more detailed relation IO statistics Andres Freund <andres@anarazel.de>
2023-02-10 14:23 ` Robert Haas <robertmhaas@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox