Lock while delete a table - Mailing list pgsql-novice

From Sergio Sinuco
Subject Lock while delete a table
Date
Msg-id CAHn1vgEBWKfbeVWhMQbo8WNcbkcmLZ1ZKK2L2a74fBjPmttPPQ@mail.gmail.com
Whole thread Raw
Responses Re: Lock while delete a table  ("Jean-Yves F. Barbier" <12ukwn@gmail.com>)
Re: Lock while delete a table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-novice
Hi guys. I have a table A with a foreign key that refers a table B. Next, I have a function F that updates some rows in B. When I delete table A, a deadlock occurs because the function and the process that delete the table A are waiting for an AccessExclusiveLock to relation B.

Why does a drop table need an AccessExclusiveLock  in tables  refered by the deleted table?

Thanks
Sergio Sinuco

pgsql-novice by date:

Previous
From: "Jean-Yves F. Barbier"
Date:
Subject: Re: error tryiing to insert with collate
Next
From: "Jean-Yves F. Barbier"
Date:
Subject: Re: Lock while delete a table