Re: WIP: new system catalog pg_wait_event
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
Cc: "Drouvot, Bertrand" <bertranddrouvot.pg@gmail.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Date: 2023-08-17T22:37:52Z
Lists: pgsql-hackers
On Thu, Aug 17, 2023 at 04:37:22PM +0900, Masahiro Ikeda wrote: > On 2023-08-17 14:53, Drouvot, Bertrand wrote: > BTW, is it better to start with "Waiting" like any other lines? > For example, "Waiting for custom event \"worker_spi_main\" defined by an > extension". Using "Waiting for custom event" is a good term here. I am wondering if this should be s/extension/module/, as an event could be set by a loaded library, which may not be set with CREATE EXTENSION. > ex. > postgres(3789417)=# SELECT a.pid, a.wait_event_type, a.wait_event, > w.description FROM pg_stat_activity a JOIN pg_wait_event w ON > (a.wait_event_type = w.type AND a.wait_event = w.name) WHERE wait_event is > NOT NULL; > pid | wait_event_type | wait_event | > description > ---------+-----------------+-------------------+-------------------------------------------------------- > 3783759 | Activity | AutoVacuumMain | Waiting in main loop of > autovacuum launcher process > 3812866 | Extension | WorkerSpiMain | Custom wait event > "WorkerSpiMain" defined by extension > 3783756 | Activity | BgWriterHibernate | Waiting in background > writer process, hibernating > 3783760 | Activity | ArchiverMain | Waiting in main loop of > archiver process > 3783755 | Activity | CheckpointerMain | Waiting in main loop of > checkpointer process > 3783758 | Activity | WalWriterMain | Waiting in main loop of WAL > writer process > (6 rows) You need to think about the PDF being generated from the SGML docs, as well, so this should not be too large. I don't think we need to care about wait_event_type for this example, so it can be removed. If the tuple generated is still too large, showing one tuple under \x with a filter on backend_type would be enough. -- Michael
Commits
-
doc: Improve example query related to pg_wait_events
- befe9451fbf5 17.0 landed
-
Add system view pg_wait_events
- 1e68e43d3f0f 17.0 landed