pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dan Armbrust <daniel.armbrust.list@gmail.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Problem dropping a table
Date: Wed, 10 May 2006 09:43:35 -0500
Message-ID: <4461FC17.5080400@gmail.com> (raw)
In-Reply-To: <446142D8.10207@opencloud.com>
References: <4460FDE9.9040600@comcast.net>
	<446142D8.10207@opencloud.com>

Oliver Jowett wrote:

> 
> 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
> 

Well, thats good (but utterly confusing to me) to know... I'm not 
running any transactions, and nothing else is going on concurrently that 
I'm aware of.  But it gives me a new direction to go hunting in.  I've 
certainly spent enough time checking for unclosed resultsets and 
prepared statements.  I know that the lock is being held by my code, I 
just don't know where.  Funny thing is, this code is written to work on 
multiple databases - and I don't have any issues at all on DB2, MySQL, 
Oracle, MSAccess, or Hypersonic DB.  Just Postgres, in this one set of 
queries.  Which is starting to make me think I've uncovered a driver 
bug...  I'm going to spend more time today trying to figure out which 
exact query of mine is establishing the lock.

Dan

-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/



view thread (4+ messages)  latest in thread

Message-ID: <4461FC17.5080400@gmail.com>
Permalink:  ../4461FC17.5080400@gmail.com/
Also on:    postgresql.org/message-id/4461FC17.5080400@gmail.com

 · 

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.list@gmail.com, oliver@opencloud.com
  Subject: Re: Problem dropping a table
  In-Reply-To: <4461FC17.5080400@gmail.com>
  References: <4460FDE9.9040600@comcast.net> <446142D8.10207@opencloud.com> <4461FC17.5080400@gmail.com>

* 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