pgsql: Add pg_stat_io view, providing more detailed IO statistics

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: Add pg_stat_io view, providing more detailed IO statistics
Дата
Msg-id E1pQuWV-000bpI-5x@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Un-revert "Disable STARTUP_PROGRESS_TIMEOUT in standby mode."
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: pgindent: filter files for the --commit option