Re: Record locking in deadlock

Поиск
Список
Период
Сортировка
От Robert Wille
Тема Re: Record locking in deadlock
Дата
Msg-id 010a01c3416f$df594250$6402a8c0@zucchini
обсуждение исходный текст
Ответы Re: Record locking in deadlock  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Record locking in deadlock  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I no longer believe that I have gotten into a deadlock situation, but
rather, it appears that somehow a portion of my table somehow gets locked,
and stays locked, even after whatever locked it is done. I have added code
to my application to track what every connection is doing. In the two cases
I have been able to analyze, when the problem first occurs, all connections
are hung trying to do single row updates, except for one, which is reading.
A multi-row update eventually joins the throng of blocked updates, but it
appears that the first calls that end up blocking invariably are single-row
updates.

Incidentally, these single-row updates occur within a transaction. Nothing
else happens in the transaction, so it should be irrelevant, but I thought
I'd mention it anyway.

Any idea how this could happen or how to track it down? Is there any way to
look at what records are locked, and what caused them to be locked?

Thanks in advance again.

Robert
----- Original Message -----
Sent: Wednesday, July 02, 2003 1:43 PM
Subject: [GENERAL] Record locking in deadlock

I have an application that uses Postgres 7.2.3. It appears to deadlock from time to time. I'm not absolutely sure that it deadlocks, but I'm pretty sure because all of a sudden all my updates block, and my postgres processes are all idle.
 
The strange thing is that my application never concurrently modifies any row (although it does modify multiple rows in the same table within a given transaction), so I don't know how this could happen, unless perhaps locking occurs on pages rather than rows. Can someone explain to me how/why my application could be deadlocking?
 
Thanks in advance.
 
Robert Wille
 

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: problem with regexp (cant quote +)
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: [pgadmin-support] pgAdmin III - Call for Translators