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

From Peter Eisentraut
Subject Re: RFC: replace pg_stat_activity.waiting with something more descriptive
Date
Msg-id 558DACC8.4080201@gmx.net
Whole thread Raw
In response to Re: RFC: replace pg_stat_activity.waiting with something more descriptive  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 6/25/15 11:39 PM, Robert Haas wrote:
>> Could that also cover waiting on network?
> 
> Possibly.  My approach requires that the number of wait states be kept
> relatively small, ideally fitting in a single byte.  And it also
> requires that we insert pgstat_report_waiting() calls around the thing
> that is notionally blocking.  So, if there are a small number of
> places in the code where we do network I/O, we could stick those calls
> around those places, and this would work just fine.  But if a foreign
> data wrapper, or any other piece of code, does network I/O - or any
> other blocking operation - without calling pgstat_report_waiting(), we
> just won't know about it.

That sounds doable, assuming that extension authors play along.

I see that network problems because of connection poolers, foreign-data
connections, and so on, are a significant cause of session "hangs", so
it would be good if they could be covered.




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: checkpointer continuous flushing
Next
From: Jeff Janes
Date:
Subject: Re: PANIC in GIN code