Add system view pg_wait_events
Michael Paquier <michael@paquier.xyz>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +13 −1 |
| doc/src/sgml/system-views.sgml | modified | +64 −0 |
| src/backend/catalog/system_views.sql | modified | +3 −0 |
| src/backend/Makefile | modified | +2 −1 |
| src/backend/utils/activity/generate-wait_event_types.pl | modified | +52 −4 |
| src/backend/utils/activity/.gitignore | modified | +1 −0 |
| src/backend/utils/activity/Makefile | modified | +6 −2 |
| src/backend/utils/activity/meson.build | modified | +1 −0 |
| src/backend/utils/activity/wait_event.c | modified | +40 −0 |
| src/backend/utils/activity/wait_event_funcs.c | added | +93 −0 |
| src/include/catalog/pg_proc.dat | modified | +6 −0 |
| src/include/utils/meson.build | modified | +2 −2 |
| src/include/utils/wait_event.h | modified | +1 −0 |
| src/test/modules/worker_spi/t/001_worker_spi.pl | modified | +6 −0 |
| src/test/regress/expected/rules.out | modified | +4 −0 |
| src/test/regress/expected/sysviews.out | modified | +16 −0 |
| src/test/regress/sql/sysviews.sql | modified | +4 −0 |
| src/tools/msvc/clean.bat | modified | +1 −0 |
| src/tools/msvc/Solution.pm | modified | +2 −1 |
Documentation touched
Discussion
- WIP: new system catalog pg_wait_event 34 messages · 2023-08-04 → 2023-10-23