Re: Some queries starting to hang - Mailing list pgsql-performance

From Greg Stark
Subject Re: Some queries starting to hang
Date
Msg-id 87ejy29tx1.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: Some queries starting to hang  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Some queries starting to hang
List pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:

> The idea I just had was: why do we need EXPLAIN ANALYZE to run to
> completion? In severe cases like this thread, we might be able to
> discover the root cause by a *partial* execution of the plan, as long as
> it was properly instrumented. That way, the OP might have been able to
> discover the root cause himself...

An alternate approach would be to implement a SIGINFO handler that prints out
the explain analyze output for the data built up so far. You would be able to
keep hitting C-t and keep getting updates until the query completes or you
decided to hit C-c.

I'm not sure how easy this would be to implement but it sure would be nice
from a user's point of view. Much nicer than having to specify some arbitrary
limit before running the query.

--
greg

pgsql-performance by date:

Previous
From: "A.M."
Date:
Subject: Re: Some queries starting to hang
Next
From: Tom Lane
Date:
Subject: Re: Some queries starting to hang