Re: adding foreign key constraint locks up table

От: Florian Weimer
Тема: Re: adding foreign key constraint locks up table
Дата: ,
Msg-id: 82ei926j3p.fsf@mid.bfk.de
(см: обсуждение, исходный текст)
Ответ на: adding foreign key constraint locks up table  (kakarukeys)
Ответы: Re: adding foreign key constraint locks up table  (Tom Lane)
Список: pgsql-performance

Скрыть дерево обсуждения

adding foreign key constraint locks up table  (kakarukeys, )
 Re: adding foreign key constraint locks up table  (Gurjeet Singh, )
  Re: adding foreign key constraint locks up table  ("Kevin Grittner", )
   Re: adding foreign key constraint locks up table  (Gurjeet Singh, )
    Re: adding foreign key constraint locks up table  ("Kevin Grittner", )
 Re: adding foreign key constraint locks up table  (Lew, )
 Re: adding foreign key constraint locks up table  (kakarukeys, )
  Re: adding foreign key constraint locks up table  (Gurjeet Singh, )
 Re: adding foreign key constraint locks up table  (Florian Weimer, )
  Re: adding foreign key constraint locks up table  (Tom Lane, )
   Re: adding foreign key constraint locks up table  (Florian Weimer, )
    Re: adding foreign key constraint locks up table  (Tom Lane, )
 Re: adding foreign key constraint locks up table  (kakarukeys, )
  Re: adding foreign key constraint locks up table  (Robert Haas, )
 Re: adding foreign key constraint locks up table  (kakarukeys, )

> Whenever I try to create a new table "bbb" with foreign key pointing
> to "aaa". The operation locks, and reading "aaa" is not possible. The
> query also never seems to finish.

Do you mean that the ALTER query and subsequent queries are shown as
"waiting" in pg_stat_activity?  In this case, I'm also wondering why
this is inecessary.

--
Florian Weimer                <>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


В списке pgsql-performance по дате сообщения:

От: Tom Lane
Дата:
Сообщение: Re: adding foreign key constraint locks up table
От: Greg Smith
Дата:
Сообщение: Re: Regression: 8.3 2 seconds -> 8.4 100+ seconds