Add system view pg_wait_events

Michael Paquier <michael@paquier.xyz>

Commit: 1e68e43d3f0ff1dcf4a5926f9d6336b86bda034d
Author: Michael Paquier <michael@paquier.xyz>
Date: 2023-08-20T06:35:02Z
Releases: 17.0
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

Documentation touched

Discussion