Fully replacing ps_status (was Re: [COMMITTERS] pgsql: Add GUC update_process_title to control whether 'ps' display is) - Mailing list pgsql-hackers

From Tom Lane
Subject Fully replacing ps_status (was Re: [COMMITTERS] pgsql: Add GUC update_process_title to control whether 'ps' display is)
Date
Msg-id 8593.1151447817@sss.pgh.pa.us
Whole thread Raw
Responses Re: Fully replacing ps_status (was Re: [COMMITTERS] pgsql:  (Bruce Momjian <bruce@momjian.us>)
Re: Fully replacing ps_status (was Re: [COMMITTERS] pgsql:  (Mark Kirkwood <markir@paradise.net.nz>)
Re: Fully replacing ps_status (was Re: [COMMITTERS] pgsql: Add GUC update_process_title to control whether 'ps' display is)  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
momjian@postgresql.org (Bruce Momjian) writes:
> Add GUC update_process_title to control whether 'ps' display is updated
> for every command, default to on.

It strikes me that the ps_status support provides one important bit of
information that is currently hard to get elsewhere; specifically, the
"waiting" flag that gets added while blocked on a lock.  You can find
out if a process is blocked by looking in pg_locks, but that's a fairly
expensive probe in itself and then you have to join to pg_stat_activity
to make any sense of it.  I wonder if we should add a "waiting" boolean
column to pg_stat_activity?  Given the new implementation of
pg_stat_activity, updating such a flag would be pretty cheap.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Stefan Kaltenbrunner
Date:
Subject: Re: GIN index creation extremely slow ?
Next
From: Bruce Momjian
Date:
Subject: Re: Fully replacing ps_status (was Re: [COMMITTERS] pgsql: