diff options
| author | Michael Paquier | 2023-08-20 06:35:02 +0000 |
|---|---|---|
| committer | Michael Paquier | 2023-08-20 06:35:02 +0000 |
| commit | 1e68e43d3f0ff1dcf4a5926f9d6336b86bda034d (patch) | |
| tree | f5ca7fce32380b095180dbdf147d5af176faccdf /src/include/utils | |
| parent | a2a6249cf1a4210caac534e8454a1614d0dd081a (diff) | |
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
Diffstat (limited to 'src/include/utils')
| -rw-r--r-- | src/include/utils/meson.build | 4 | ||||
| -rw-r--r-- | src/include/utils/wait_event.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/include/utils/meson.build b/src/include/utils/meson.build index 6de5d937991..c1794786117 100644 --- a/src/include/utils/meson.build +++ b/src/include/utils/meson.build @@ -1,6 +1,6 @@ # Copyright (c) 2022-2023, PostgreSQL Global Development Group -wait_event_output = ['wait_event_types.h', 'pgstat_wait_event.c'] +wait_event_output = ['wait_event_types.h', 'pgstat_wait_event.c', 'wait_event_funcs_data.c'] wait_event_target = custom_target('wait_event_names', input: files('../../backend/utils/activity/wait_event_names.txt'), output: wait_event_output, @@ -11,7 +11,7 @@ wait_event_target = custom_target('wait_event_names', ], build_by_default: true, install: true, - install_dir: [dir_include_server / 'utils', false], + install_dir: [dir_include_server / 'utils', false, false], ) wait_event_types_h = wait_event_target[0] diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h index 3eebdfad38b..009b03a520a 100644 --- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -63,6 +63,7 @@ extern void WaitEventExtensionShmemInit(void); extern Size WaitEventExtensionShmemSize(void); extern uint32 WaitEventExtensionNew(const char *wait_event_name); +extern char **GetWaitEventExtensionNames(int *nwaitevents); /* ---------- * pgstat_report_wait_start() - |
