Re: Optimization of FK creation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimization of FK creation
Дата
Msg-id 22495.1286548825@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Optimization of FK creation  (Robert Ayrapetyan <robert.ayrapetyan@comodo.com>)
Список pgsql-general
Robert Ayrapetyan <robert.ayrapetyan@comodo.com> writes:
> I think it's very easy to check if "table_foo" is empty and therefore
> not requires any locks on
> "parent_table" and generate FK immediately without acquiring the lock
> on "parent" table.

Unfortunately, that's complete nonsense.  The reason for the lock on the
parent is so that DDL changes can be applied to it, namely addition of
triggers.

            regards, tom lane

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

Предыдущее
От: Robert Ayrapetyan
Дата:
Сообщение: Optimization of FK creation
Следующее
От: Ugo PARSI
Дата:
Сообщение: Segfault : PostgreSQL 9.0.0 and PgPool-II.