Re: Why does FK creation still take an access exclusive lock on the referenced table? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Why does FK creation still take an access exclusive lock on the referenced table?
Date
Msg-id 16240.1360260778@sss.pgh.pa.us
Whole thread Raw
In response to Why does FK creation still take an access exclusive lock on the referenced table?  (Josh Berkus <josh@agliodbs.com>)
List pgsql-bugs
Josh Berkus <josh@agliodbs.com> writes:
> I understand why establishing an FK needs an ExclusiveLock on the
> referenced table, but it doesn't need an AccessExclusiveLock.

Yes, it does, because it's adding triggers.  We can't improve this
in the near term, and complaining about it doesn't change that.

At the very least we need MVCC catalog scans before we can think
about reducing lock levels for DDL.  I forget whether there are any
other issues...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Josh Berkus
Date:
Subject: Why does FK creation still take an access exclusive lock on the referenced table?
Next
From: chris.meisinger@centro.net
Date:
Subject: BUG #7857: postgresql91-libs fails to create ld.so.conf.d symlink