On Fri, Dec 31, 2010 at 09:44:43AM +0530, tamanna madaan wrote: > However, This is not a very long running query. > This was supposed to update only one row in a table. That it's supposed to update only one row does not mean it wasn't a very long running query. > Moreover, it cant be waiting for a lock as > other processes were able to update the same table at the same time. I don't see how that follows. Postgres doesn't normally lock the whole table. > restarting the process which was stuck because of this query, also > resolved the issue. That means after restart, the process was able to > update the same table. Had it been waiting for a lock before , it wouldn't > have been able to update the table after restart either. I don't think that's true. If you restarted, you killed all the outstanding operations. If something previously had a lock that was blocking your query, that lock was removed. Now your query can go through. In order to know whether there is a problem with a lock, you can use the pg_locks system view. Documentation is in the manual: http://www.postgresql.org/docs/9.0/interactive/view-pg-locks.html (or, for your release, http://www.postgresql.org/docs/8.1/interactive/view-pg-locks.html). By the way, the advice you got yesterday about upgrading is good advice. I wouldn't keep running the version you're running. A -- Andrew Sullivan ajs@xxxxxxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general