Re: RFC: replace pg_stat_activity.waiting with something more descriptive - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Date
Msg-id CAA4eK1KQaBZdc73mb7-oH_n_kUwQbuTSvZGUgwAM_O0eUfusOw@mail.gmail.com
Whole thread Raw
In response to Re: RFC: replace pg_stat_activity.waiting with something more descriptive  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Jun 25, 2015 at 8:20 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Andres Freund <andres@anarazel.de> writes:
> > On 2015-06-25 10:01:39 -0400, Tom Lane wrote:
> >> The problem with the query analogy is that it's possible to tell whether
> >> the query is active or not, by looking at the status column.  We need to
> >> avoid a situation where you can't tell if the wait status is current or
> >> merely the last thing waited for.
>
> > Well, that's what the 'waiting' column would be about in the proposal I'm
> > commenting about.
>
> To do that, we'd have to change the semantics of the 'waiting' column so
> that it becomes true for non-heavyweight-lock waits.

If we introduce a new view like pg_stat_wait_event as mentioned above,
then we can avoid this problem, existing 'waiting' in pg_stat_activity
would mean same as it mean today and new column 'waiting' in
pg_stat_wait_event could indicate the waits for non-heavyweight-lock.


With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgbench - allow backslash-continuations in custom scripts
Next
From: Jeff Janes
Date:
Subject: BRIN index bug due to WAL refactoring