X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 21C409FA159 for ; Tue, 9 May 2006 22:33:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 89350-04 for ; Tue, 9 May 2006 22:33:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 986669F9DCD for ; Tue, 9 May 2006 22:33:17 -0300 (ADT) Received: from 221x253x225x162.ap221.ftth.ucom.ne.jp ([221.253.225.162] helo=[192.168.1.171]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1FddZi-0002wF-Jl; Wed, 10 May 2006 13:33:14 +1200 Message-ID: <446142D8.10207@opencloud.com> Date: Wed, 10 May 2006 10:33:12 +0900 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Armbrust CC: pgsql-jdbc@postgresql.org Subject: Re: Problem dropping a table References: <4460FDE9.9040600@comcast.net> In-Reply-To: <4460FDE9.9040600@comcast.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/22 X-Sequence-Number: 15150 Daniel Armbrust wrote: > I tried 'setQueryTimeout' on the prepared statement, but > it doesn't seem to have any effect. Still hangs indefinitely. Is > setQueryTimeout implemented in the driver? I first posted on the > regular mailing list, and Tom answered that the server should be > supporting it. I think that setQueryTimeout currently does nothing (it's just a hint anyway, so this behaviour is legal -- it's just that noone has had time to do a proper implementation). You could manually execute a "set statement_timeout" query to get a similar effect. > The second, how can I track down what is locking this table? I presume that it is some of my code somewhere... maybe a prepared statement that I didn't get closed - but I can't find it. I've checked my code twice for any reference to this table, and every use of it is properly closing the result sets and the prepared statement. It seems like maybe the driver isn't releasing a lock when it is supposed to? Merely having a prepared statement or resultset referencing the table does not hold locks. The only thing that holds locks (AFAIK) is an open transaction that did something requiring a lock. So perhaps you have an open transaction on another connection that used the table but has not yet called commit()/rollback(), or you have a concurrently executing query that holds the lock? -O