Re: org.postgresql.core.QueryExecutor.execute not responding - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: org.postgresql.core.QueryExecutor.execute not responding
Date
Msg-id Pine.LNX.4.33.0401300142190.31839-100000@leary.csoft.net
Whole thread Raw
In response to org.postgresql.core.QueryExecutor.execute not responding (Deadlock ?)  ("Email User" <support@ebusinessoft.com>)
List pgsql-jdbc

On Fri, 30 Jan 2004, Email User wrote:

> I used postgres 7.2.3 and pg72jdbc2.jar as my jdbc driver on my production
> server (java 1.4.2_02, jakarta-tomcat-4.1.24, Redhat Linux 8.0). The jdbc seem
> to having problems when the postgresql server was
> buzy. The org.postgresql.core.QueryExecutor.execute stuck when doing updating
> process for a query. This caused all my other threads that waiting for execute
> a query hang because waiting for releasing of the lock on
> postgresql.core.QueryExecutor.execute. I have attacted the thread dump from my
> server. I suspected that the postgresql having deadlock on the server site but
> however i cannot confirm about that. Does postgresql having capability of
> detection for deadlock ? Or, it was bugs for the jdbc driver ?

This is likely a problem with a long running transaction that is holding a
lock that the other connections are waiting on.  PG does have deadlock
detection, but this situation is not a deadlock.  A deadlock is when there
is no way any of the involved transactions can possibly succeed.
Here the transaction would be waiting, but with the ability to
continue once the long running transaction committed or rolled
back.  In later versions of pg there is a system view pg_locks which can
be used to debug this, but you are left with using ps and the pg_stat*
views if you have enabled the stats collector.

Kris Jurka



pgsql-jdbc by date:

Previous
From: adp adp
Date:
Subject: connectivity problem
Next
From: Paul Thomas
Date:
Subject: Re: connectivity problem