Re: Clearing locks

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: Clearing locks
Дата
Msg-id 20050322141953.GA23524@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на Re: Clearing locks  (Neil Conway <neilc@samurai.com>)
Список pgsql-general
On Tue, Mar 22, 2005 at 04:19:06PM +1100, Neil Conway wrote:
> Edwin New wrote:
> >I have encountered a situation where a java process is dying but leaving
> >locks active.
>
> So it seems that the problem is that when the client dies, it is not
> actually disconnecting from PostgreSQL, and is in the midst of a
> transaction that has acquired some locks. Perhaps this is due to buggy
> connection pooling software that does not rollback a connection's

It needn't even be a matter of a pool.  I've seen plenty of cases
where the transaction is in mid-execution when the client dies.  The
connection stays open because the transaction is still going on
(think of a very long running UPDATE, for instance).  The transaction
will indeed roll back when the back end attempts to deliver the
results, and finds the client is gone.  But in the mean time, the
locks are maintained.

In any case, the answer probably is still to kill -2 the offending
back end.

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
The fact that technology doesn't work is no bar to success in the marketplace.
        --Philip Greenspun

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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Constraint problem
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: multi line text data/query ?bug?