pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgstat: Track more detailed relation IO statistics
Date: Fri, 10 Feb 2023 06:24:44 +0000
Message-ID: <E1pQMpw-000MPf-4r@gemulon.postgresql.org> (raw)

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1pQMpw-000MPf-4r@gemulon.postgresql.org>
Permalink:  ../E1pQMpw-000MPf-4r@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pQMpw-000MPf-4r@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: pgstat: Track more detailed relation IO statistics
  In-Reply-To: <E1pQMpw-000MPf-4r@gemulon.postgresql.org>
  References: <E1pQMpw-000MPf-4r@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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