From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: exposing wait events for non-backends (was: Tracking wait event for latches) |
Date: | 2016-12-13 01:05:12 |
Message-ID: | CAMsr+YHiE=qh2F0-yJyd-2e+cFAuD-aRvywwuBGFE3hMP+tWLg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 13 December 2016 at 01:45, Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
> On Mon, Dec 12, 2016 at 10:33 AM, Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-12-13 01:07:46 | Re: PATCH: recursive json_populate_record() |
Previous Message | Andres Freund | 2016-12-13 01:00:59 | Re: pgsql: Add support for temporary replication slots |