Thanks Tom for your reply . However, This is not a very long running query. This was supposed to update only one row in a table. Moreover, it cant be waiting for a lock as other processes were able to update the same table at the same time. 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.
Regards Tamanna -----Original Message----- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Thu 12/30/2010 11:23 PM To: tamanna madaan Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] query stuck at SOCK_wait_for_ready function call "tamanna madaan" <tamanna.ma...@globallogic.com> writes: > I am using postgres-8.1.2 and have been using psqlodbc-08.03.0200 driver to > connect > to the databse. One of the queries I executed from my appilcation have got > stuck for an > indefinite amount of time causing my application to hang. Are you sure you didn't simply issue a very long-running query? Or one that is waiting for a lock? regards, tom lane