Re: WIP: new system catalog pg_wait_event

Pavel Luzanov <p.luzanov@postgrespro.ru>

From: Pavel Luzanov <p.luzanov@postgrespro.ru>
To: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>, Michael Paquier <michael@paquier.xyz>
Cc: Masahiro Ikeda <ikedamsh@oss.nttdata.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Date: 2023-10-23T10:17:42Z
Lists: pgsql-hackers

Attachments

Please, consider this small fix for the query example in the docs[1]:

SELECT a.pid, a.wait_event, w.description
   FROM pg_stat_activity a JOIN
        pg_wait_events w ON (a.wait_event_type = w.type AND
                             a.wait_event = w.name)
   WHERE wait_event is NOT NULL and a.state = 'active';

I propose to add a table alias for the wait_event column in the WHERE clause for consistency.

1.https://www.postgresql.org/docs/devel/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW

-- 
Pavel Luzanov
Postgres Professional:https://postgrespro.com

Commits

  1. doc: Improve example query related to pg_wait_events

  2. Add system view pg_wait_events