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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Dropping constraints on a table locks referenced table... why?
Date: 2018-04-17 18:57:52
Message-ID: 2444.1523991472@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Wells Oliver <wells(dot)oliver(at)gmail(dot)com> writes:
> 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?

There are triggers on both tables that have to be removed.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Akshay Ballarpure 2018-04-18 07:30:38 pg_upgrade help
Previous Message Wells Oliver 2018-04-17 18:25:14 Dropping constraints on a table locks referenced table... why?