Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present - Mailing list pgsql-bugs

From Michael Fuhr
Subject Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present
Date
Msg-id 20050114181815.GB18434@winnie.fuhr.org
Whole thread Raw
In response to Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present  (Michael Fuhr <mike@fuhr.org>)
Responses Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever
Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present
List pgsql-bugs
On Fri, Jan 14, 2005 at 10:47:52PM +1100, Fahad G. wrote:

> I'm sorry, the query, as you would have thought, was:
>
> SELECT some_field FROM some_table WHERE some_field = 45 ORDER BY time LIMIT 1;

Yes, I assumed the query looked like that, and I couldn't reproduce
the problem with it.  My point was that you haven't given us a
self-contained test case that we can use to reproduce the problem,
so we have to guess at what the missing parts are.  Solving this
would be a lot easier if you'd just tell us what you're doing so
we don't have to spend unnecessary time guessing.

As I requested before, please provide the exact steps we can take
to reproduce the problem.  Show the CREATE TABLE statement and any
other statements that occur before the SELECT statement.  Show
everything that we can copy and paste into an empty database to
make the problem happen.

Since you say the query takes forever to return, it might be useful
to see the output of pg_locks.  Run the SELECT query that locks up
in one session, then open another session and run the following
query:

SELECT relation::regclass, * FROM pg_locks;

Include the output of that query in your message.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-bugs by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [pgsql-bugs] Daily digest v1.1341 (25 messages)
Next
From: Simon Riggs
Date:
Subject: Re: BUG #1397: busy-loop hang on web server