Re: RFC: replace pg_stat_activity.waiting with something more descriptive

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Date: 2015-06-26 00:53:35
Message-ID: CAA4eK1KQaBZdc73mb7-oH_n_kUwQbuTSvZGUgwAM_O0eUfusOw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 25, 2015 at 8:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Andres Freund <andres(at)anarazel(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-06-26 01:03:06 BRIN index bug due to WAL refactoring
Previous Message Michael Paquier 2015-06-26 00:15:54 Re: pgbench - allow backslash-continuations in custom scripts