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: Add pg_stat_io view, providing more detailed IO statistics
Date: Sat, 11 Feb 2023 18:22:55 +0000
Message-ID: <E1pQuWV-000bpI-5x@gemulon.postgresql.org> (raw)

Add pg_stat_io view, providing more detailed IO statistics

Builds on 28e626bde00 and f30d62c2fc6. See the former for motivation.

Rows of the view show IO operations for a particular backend type, IO target
object, IO context combination (e.g. a client backend's operations on
permanent relations in shared buffers) and each column in the view is the
total number of IO Operations done (e.g. writes). So a cell in the view would
be, for example, the number of blocks of relation data written from shared
buffers by client backends since the last stats reset.

In anticipation of tracking WAL IO and non-block-oriented IO (such as
temporary file IO), the "op_bytes" column specifies the unit of the "reads",
"writes", and "extends" columns for a given row.

Rows for combinations of IO operation, backend type, target object and context
that never occur, are ommitted entirely. For example, checkpointer will never
operate on temporary relations.

Similarly, if an IO operation never occurs for such a combination, the IO
operation's cell will be null, to distinguish from 0 observed IO
operations. For example, bgwriter should not perform reads.

Note that some of the cells in the view are redundant with fields in
pg_stat_bgwriter (e.g. buffers_backend). For now, these have been kept for
backwards compatibility.

Bumps catversion.

Author: Melanie Plageman <melanieplageman@gmail.com>
Author: Samay Sharma <smilingsamay@gmail.com>
Reviewed-by: Maciek Sakrejda <m.sakrejda@gmail.com>
Reviewed-by: Lukas Fittl <lukas@fittl.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Justin Pryzby <pryzby@telsasoft.com>
Discussion: https://postgr.es/m/20200124195226.lth52iydq2n2uilq@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a9c70b46dbe152e094f137f7e6ba9cd3a638ee25

Modified Files
--------------
doc/src/sgml/monitoring.sgml         | 321 +++++++++++++++++++++++++++++++++--
src/backend/catalog/system_views.sql |  15 ++
src/backend/utils/adt/pgstatfuncs.c  | 141 +++++++++++++++
src/include/catalog/catversion.h     |   2 +-
src/include/catalog/pg_proc.dat      |   9 +
src/test/regress/expected/rules.out  |  12 ++
src/tools/pgindent/typedefs.list     |   1 +
7 files changed, 486 insertions(+), 15 deletions(-)



Message-ID: <E1pQuWV-000bpI-5x@gemulon.postgresql.org>
Permalink:  ../E1pQuWV-000bpI-5x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pQuWV-000bpI-5x@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: Add pg_stat_io view, providing more detailed IO statistics
  In-Reply-To: <E1pQuWV-000bpI-5x@gemulon.postgresql.org>
  References: <E1pQuWV-000bpI-5x@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