Dropping constraints on a table locks referenced table... why?

From: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Dropping constraints on a table locks referenced table... why?
Date: 2018-04-17 18:25:14
Message-ID: CAOC+FBX7kKHXzfAyeMGn__vE8WoXYpDSR=SUaGtBfTmFoNQpAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

I have a table A which has an FK constraint referencing another table B.
Dropping this FK constraint on A locks table B, as does trying to drop
table A. Why is this?

Is there some more efficient way to remove FK constraints without locking
the referenced table?

Thanks for clarification.

--
Wells Oliver
wells(dot)oliver(at)gmail(dot)com <wellsoliver(at)gmail(dot)com>

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2018-04-17 18:57:52 Re: Dropping constraints on a table locks referenced table... why?
Previous Message David G. Johnston 2018-04-17 17:45:58 Re: Possible bug on code autocomplete pgadmin V 3.0