From: | Dan Armbrust <daniel(dot)armbrust(dot)list(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Problem dropping a table |
Date: | 2006-05-09 15:39:30 |
Message-ID: | 4460B7B2.9080006@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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.
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 check my code twice for
any reference to this table, and every use of it is properly closing the
result sets and the prepared statement.
Any ideas?
Thanks,
Dan
--
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-05-09 15:45:49 | Re: Problem dropping a table |
Previous Message | Karl O. Pinc | 2006-05-09 15:31:34 | Re: pg_restore duplicate key violations |