From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add system view pg_wait_events |
Date: | 2023-08-20 06:38:28 |
Message-ID: | E1qXc4y-0012t7-BI@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add system view pg_wait_events
This new view, wrapped around a SRF, shows some information known about
wait events, as of:
- Name.
- Type (Activity, I/O, Extension, etc.).
- Description.
All the information retrieved comes from wait_event_names.txt, and the
description is the same as the documentation with filters applied to
remove any XML markups. This view is useful when joined with
pg_stat_activity to get the description of a wait event reported.
Custom wait events for extensions are included in the view.
Original idea by Yves Colin.
Author: Bertrand Drouvot
Reviewed-by: Kyotaro Horiguchi, Masahiro Ikeda, Tom Lane, Michael
Paquier
Discussion: https://postgr.es/m/0e2ae164-dc89-03c3-cf7f-de86378053ac@gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1e68e43d3f0ff1dcf4a5926f9d6336b86bda034d
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 14 +++-
doc/src/sgml/system-views.sgml | 64 +++++++++++++++
src/backend/Makefile | 3 +-
src/backend/catalog/system_views.sql | 3 +
src/backend/utils/activity/.gitignore | 1 +
src/backend/utils/activity/Makefile | 8 +-
.../utils/activity/generate-wait_event_types.pl | 56 ++++++++++++-
src/backend/utils/activity/meson.build | 1 +
src/backend/utils/activity/wait_event.c | 40 ++++++++++
src/backend/utils/activity/wait_event_funcs.c | 93 ++++++++++++++++++++++
src/include/catalog/pg_proc.dat | 6 ++
src/include/utils/meson.build | 4 +-
src/include/utils/wait_event.h | 1 +
src/test/modules/worker_spi/t/001_worker_spi.pl | 6 ++
src/test/regress/expected/rules.out | 4 +
src/test/regress/expected/sysviews.out | 16 ++++
src/test/regress/sql/sysviews.sql | 4 +
src/tools/msvc/Solution.pm | 3 +-
src/tools/msvc/clean.bat | 1 +
19 files changed, 317 insertions(+), 11 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-08-20 06:47:48 | pgsql: Bump catalog version for pg_wait_events |
Previous Message | Andres Freund | 2023-08-19 22:15:33 | pgsql: ci: macos: use cached macports install |