Re: exposing wait events for non-backends (was: Tracking wait event for latches)
Craig Ringer <craig@2ndquadrant.com>
From: Craig Ringer <craig@2ndquadrant.com>
To: Kevin Grittner <kgrittn@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Alvaro Herrera <alvherre@2ndquadrant.com>, Robert Haas <robertmhaas@gmail.com>,
Michael Paquier <michael.paquier@gmail.com>, Thomas Munro <thomas.munro@enterprisedb.com>, Alexander Korotkov <a.korotkov@postgrespro.ru>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2016-12-13T01:05:12Z
Lists: pgsql-hackers
On 13 December 2016 at 01:45, Kevin Grittner <kgrittn@gmail.com> wrote: > On Mon, Dec 12, 2016 at 10:33 AM, Andres Freund <andres@anarazel.de> wrote: >> On 2016-12-12 13:26:32 -0300, Alvaro Herrera wrote: >>> Robert Haas wrote: > >>>> 1. Show all processes that have a PGPROC in pg_stat_activity, > >>>> 2. Add a second view, say pg_stat_system_activity, > >>> I vote 1. >> >> +1 > > +1 I've long wanted the ability to see auxillary process state in pg_stat_activity, so +1. Right now pg_stat_replication is a join over pg_stat_get_activity() and pg_stat_get_wal_senders() filtered for walsenders, and pg_stat_activity is a view over pg_stat_get_activity() filtered for processes with a user id. I'd really like to see walsenders in pg_stat_activity now that logical decoding makes them more than dumb I/O channels, as well as other auxillary processes. We should probably expose a proc_type or something, with types: * client_backend * bgworker * walsender * autovacuum * checkpointer * bgwriter for simpler filtering. I don't think existing user code is likely to get upset by more processes appearing in pg_stat_activity, and it'll be very handy. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Commits
-
Show more processes in pg_stat_activity.
- fc70a4b0df38 10.0 landed