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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, 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-25 14:50:44
Message-ID: 2268.1435243844@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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. I'm not sure whether
that's a good idea or not; I'm afraid there may be client-side code that
expects 'waiting' to indicate that there's a corresponding row in
pg_locks. If we're willing to do that, then I'd be okay with
allowing wait_status to be defined as "last thing waited for"; but the
two points aren't separable.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-06-25 15:00:29 Schedule for 9.5alpha1
Previous Message Peter Eisentraut 2015-06-25 14:42:54 Re: [COMMITTERS] pgsql: psql: show proper row count in \x mode for zero-column output