executeUpdate() deadlock

From: Fischer Krisztián <fischer(at)borganization(dot)com>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: executeUpdate() deadlock
Date: 2004-01-26 12:14:00
Message-ID: 40150488.3040805@borganization.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi!

It seems, this isn't my day. I made a mistake in my program, and a new
bug (?) cropped up. Once again, the JDBC API is not clear about it. So i
thought i ask here the professionals.:)

The situation is as follows:

There are 2 connections (A) and (B).
(A) begins a transaction, and executes some selects, updates, etc... on
the table (T).
(A) closes all results and statements. (But doesn't commit!)
(B) tries to drop the table (T) before (A) was committed/rolled back or
and/or closed.

The current jdbc driver stops the thread execution in the
executeUpdate() method which tries to drop the table. I guess it waits
for (A) to get closed/committed/rolled back.

Is this the correct way or should it throw an SQLException?
I'm confused about it. If somebody knows the answer, please let me
known. Thank you!

Chris

Environment:
PostgreSQL 7.4.1 (on a debian Linux with kernel 2.4.20)
JDBC Driver: fresh CVS version (from gborg)

--
Fischer Krisztián <fischer(at)borganization(dot)com>
Tel: (+36)70/3843835, (+36)1/3360547
Borganization Kft.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Waldomiro 2004-01-26 12:39:43 Re: executeUpdate() deadlock
Previous Message Fischer Krisztián 2004-01-26 11:54:39 OutOfMemoryError - bug or human error? - version info