Re: create table problems

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: create table problems
Дата
Msg-id 20060726231316.GA61952@winnie.fuhr.org
обсуждение исходный текст
Ответ на create table problems  ("Chris Hoover" <revoohc@gmail.com>)
Список pgsql-admin
On Wed, Jul 26, 2006 at 04:51:34PM -0400, Chris Hoover wrote:
>  I am trying to create a table in my production system that has a foreign
> key into an existing table.  However, this action is being blocked by
> transactions on that table, and is blocking any additional selects on that
> table.
>
> Why is this?  The table is empty (being a create), so I don't understand
> what Postgresql is trying to do.

The transaction that's creating the new table wants to acquire an
AccessExclusiveLock on the referenced table, presumably so it can
alter that table to add referential integrity triggers.  The
referenced table needs to have such triggers so it knows what
integrity checks to make when somebody tries to update or delete
its rows.  Maybe one of the developers will confirm or refute.

--
Michael Fuhr

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

Предыдущее
От: "Chris Hoover"
Дата:
Сообщение: create table problems
Следующее
От: Omer Mustafa
Дата:
Сообщение: Connection refused. Check that the hostname and port are correct