Re: executeUpdate() deadlock

Поиск
Список
Период
Сортировка
От Waldomiro
Тема Re: executeUpdate() deadlock
Дата
Msg-id 000901c3e409$7b227440$1001a8c0@shx.com.br
обсуждение исходный текст
Ответ на executeUpdate() deadlock  (Fischer Krisztián <fischer@borganization.com>)
Список pgsql-jdbc
I've done this test on a psql program, so the second session waited up to
the first session be committed.

Postgres doesn't throw an exception because he manages the concurrency.


wmiro.


----- Original Message -----
From: "Fischer Krisztián" <fischer@borganization.com>
To: "pgsql-jdbc" <pgsql-jdbc@postgresql.org>
Sent: Monday, January 26, 2004 10:14 AM
Subject: [JDBC] executeUpdate() deadlock


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@borganization.com>
Tel: (+36)70/3843835, (+36)1/3360547
Borganization Kft.


---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Fischer Krisztián
Дата:
Сообщение: executeUpdate() deadlock
Следующее
От: Fischer Krisztián
Дата:
Сообщение: Re: executeUpdate() deadlock