Lock while delete a table

From: Sergio Sinuco <sergiosinuco(at)datatraffic(dot)com(dot)co>
To: pgsql-novice(at)postgresql(dot)org
Subject: Lock while delete a table
Date: 2012-01-02 16:40:47
Message-ID: CAHn1vgEBWKfbeVWhMQbo8WNcbkcmLZ1ZKK2L2a74fBjPmttPPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Yves F. Barbier 2012-01-02 16:55:17 Re: Lock while delete a table
Previous Message Jean-Yves F. Barbier 2012-01-02 16:02:01 Re: error tryiing to insert with collate