pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Armbrust <daniel.armbrust@comcast.net>
To: pgsql-jdbc@postgresql.org
Subject: Problem dropping a table
Date: Tue, 09 May 2006 15:39:05 -0500
Message-ID: <4460FDE9.9040600@comcast.net> (raw)

I have a java application that is trying to dynamically drop a set of 
tables.  Problem is, when it gets to a particular table and I execute 
the "drop table foo cascade" command from a prepared statement, the 
query never returns.  It just hangs indefinitely.  I presume that it is 
waiting on a lock for this table, but there is nothing that I know of 
that should be locking this table.

So, I have two issues - the first, how do I prevent myself from hanging 
indefinitely?  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.

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?

Any ideas?

Thanks,

Dan

-- 
*****************************
Daniel C. Armbrust
Biomedical Informatics
Information Services
Mayo Clinic Rochester
Harwick 8-36
(507) 538-1549
daniel.armbrust@mayo.edu
*****************************




view thread (4+ messages)  latest in thread

Message-ID: <4460FDE9.9040600@comcast.net>
Permalink:  ../4460FDE9.9040600@comcast.net/
Also on:    postgresql.org/message-id/4460FDE9.9040600@comcast.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: daniel.armbrust@comcast.net
  Subject: Re: Problem dropping a table
  In-Reply-To: <4460FDE9.9040600@comcast.net>
  References: <4460FDE9.9040600@comcast.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox