Skip site navigation (1) Skip section navigation (2)

Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Fahad G(dot)" <Fahad(dot)Gilani(at)anusf(dot)anu(dot)edu(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1393: Adding 'LIMIT 1' to the query halts forever if no data present
Date: 2005-01-14 18:18:15
Message-ID: 20050114181815.GB18434@winnie.fuhr.org (view raw or flat)
Thread:
Lists: 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/

In response to

Responses

pgsql-bugs by date

Next:From: Simon RiggsDate: 2005-01-14 19:40:28
Subject: Re: BUG #1397: busy-loop hang on web server
Previous:From: Josh BerkusDate: 2005-01-14 17:17:47
Subject: Re: [pgsql-bugs] Daily digest v1.1341 (25 messages)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group