Re: Why does FK creation still take an access exclusive lock on the referenced table?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Why does FK creation still take an access exclusive lock on the referenced table?
Date: 2013-02-07 18:12:58
Message-ID: 16240.1360260778@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Josh Berkus <josh(at)agliodbs(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message chris.meisinger 2013-02-07 20:22:32 BUG #7857: postgresql91-libs fails to create ld.so.conf.d symlink
Previous Message Josh Berkus 2013-02-07 18:06:40 Why does FK creation still take an access exclusive lock on the referenced table?