Re: Full table lock dropping a foreign key

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Full table lock dropping a foreign key
Дата
Msg-id 1370.1536170544@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Full table lock dropping a foreign key  (Paul Jungwirth <pj@illuminatedcomputing.com>)
Список pgsql-general
Paul Jungwirth <pj@illuminatedcomputing.com> writes:
> I noticed that Postgres takes an AccessExclusiveLock (a lock on the 
> whole table) against the *referenced* table when dropping a foreign key. 

Yeah, that's because it involves removing a trigger.

Adding a trigger used to require AEL as well, but it was successfully
argued that that end of things could use a weaker lock.  I find the
reasoning rather dubious myself.

            regards, tom lane


В списке pgsql-general по дате отправления: