pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vit Timchishin <tivv@gtech-ua.com>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Deadlock problem
Date: Fri, 18 Nov 2005 12:09:16 +0200 (EET)
Message-ID: <200511181209.000000EC@dev-null> (raw)

Hello.

I have an multithreaded java application using postgresql. I am using UR mode (handling locking internally) 
and wa shoping to have no problems with locks.
But now I have locking porlbme where there is only one thread calling posgresql and locking in wait.
Looking at pg_lock I can see a lot of locks each holding exclusive a transaction (other two fields are empty). 
And for one transaction there is one PID holding Exclusive Lock and another waiting for shared lock for 
same transaction.
I suppose that this means that I've first used connection object from one thread and this thread pid (linux 
x86-64) took exclusive lock and now another thread tries to use same connection and is going into lock.
Am I correct? If so, why this exclusive locks are help while there no other queries executed? Or does this 
mean I can't use same connection object from different threads?


С уважением,
Виталий Валериевич Тимчишин,
Технический Директор
ООО "Голден Технолоджис"
http://www.gtech-ua.com






view thread (9+ messages)  latest in thread

Message-ID: <200511181209.000000EC@dev-null>
Permalink:  ../200511181209.000000EC@dev-null/
Also on:    postgresql.org/message-id/200511181209.000000EC@dev-null

 · 

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: tivv@gtech-ua.com
  Subject: Re: Deadlock problem
  In-Reply-To: <200511181209.000000EC@dev-null>
  References: <200511181209.000000EC@dev-null>

* 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