Josh Berkus <j...@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 -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs