Re: locking problem in jdbc driver? - Mailing list pgsql-jdbc

From Richard Broersma
Subject Re: locking problem in jdbc driver?
Date
Msg-id 396486430912300846t519b787al4c6deba6d0d2cb25@mail.gmail.com
Whole thread Raw
In response to locking problem in jdbc driver?  (Sherif Kottapurath <sherifkm@gmail.com>)
Responses Re: locking problem in jdbc driver?
List pgsql-jdbc
On Wed, Dec 30, 2009 at 8:29 AM, Sherif Kottapurath <sherifkm@gmail.com> wrote:

> All threads shown here are operating on
> the same table, and they are all parts of transactions involving multiple tables.
> deadlock detection is set for 1 sec and no dedlocks are reported by postgres.

From my experience, PostgreSQL doesn't report deadlocks.  This is true
when purposely creating a dead-lock situation using two instances of
psql.  However, unless you've set your transaction isolation level to
SERIALIZABLE ( the default isolation level is READ COMMITED), you will
not be getting deadlocks from PostgreSQL.

http://www.postgresql.org/docs/8.4/interactive/transaction-iso.html#XACT-SERIALIZABLE
http://www.postgresql.org/docs/8.4/interactive/transaction-iso.html#XACT-READ-COMMITTED

Also, IIRC the PostgreSQL JDBC driver only allows a single thread to
access a connection object at a time.

http://jdbc.postgresql.org/documentation/84/thread.html

Could this be causing your problem?

--
Regards,
Richard Broersma Jr.

pgsql-jdbc by date:

Previous
From: Sherif Kottapurath
Date:
Subject: locking problem in jdbc driver?
Next
From: Richard Broersma
Date:
Subject: Re: metadata as XML