deadlock on the same relation - Mailing list pgsql-general

From Francesco Formenti - TVBLOB S.r.l.
Subject deadlock on the same relation
Date
Msg-id 43902737.8070404@tvblob.com
Whole thread Raw
Responses Re: deadlock on the same relation
List pgsql-general
Hi all,
I have a problem about deadlock. I have several stored procedures; only
one of them uses ACCESS EXCLUSIVE LOCK on a table; however, all the
stored procedures can access to that table, using SELECT, INSERT or UPDATE.
The stored procedures are called by different processes of an external
application.

In a non-predictable way, I obtain error messages like this one:

2005-11-29 18:23:06 [12771] ERROR:  deadlock detected
DETAIL:  Process 12771 waits for AccessExclusiveLock on relation 26052
of database 17142; blocked by process 12773.
        Process 12773 waits for AccessExclusiveLock on relation 26052 of
database 17142; blocked by process 12771.
CONTEXT:  PL/pgSQL function "set_session_box_status" line 7 at SQL statement

I don't understand what's happening; is it possible that a deadlock is
detected on the same relation (that is, the stored procedure using the
ACCESS EXCLUSIVE LOCK mentioned before) ?

I'm using Postgres 7.4.7 on a Debian Sarge.

Thanks!
Francesco


--

Francesco Formenti - TVBLOB S.r.l.
Software Engineer

 Via G. Paisiello, 9 20131 Milano, Italia
 -----------------------------------------
 Phone +39 02 36562440
 Fax +39 02 20408347
 Web Site http://www.tvblob.com
 E-mail francesco.formenti@tvblob.com



pgsql-general by date:

Previous
From: "Marian Naghen"
Date:
Subject: user_write_lock_oid questions
Next
From: Volkan YAZICI
Date:
Subject: Re: encoding problem