| From: | "Vit Timchishin" <tivv(at)gtech-ua(dot)com> |
|---|---|
| To: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
| Subject: | Deadlock problem |
| Date: | 2005-11-18 10:09:16 |
| Message-ID: | 200511181209.000000EC@dev-null |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2005-11-18 18:03:47 | Re: Deadlock problem |
| Previous Message | Tjioe Ai Xin | 2005-11-18 02:02:56 | Problem when upgrade PostgreSQL 7.3.3 to PostgreSQL 8.0.3 |