Re: adding foreign key constraint locks up table

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: adding foreign key constraint locks up table
Дата
Msg-id AANLkTik8QyPfHnmALKtm4WGtTb7tDqzO4BTGYE475UHW@mail.gmail.com
обсуждение исходный текст
Ответ на Re: adding foreign key constraint locks up table  (kakarukeys <kakarukeys@gmail.com>)
Список pgsql-performance
On Wed, Jan 5, 2011 at 2:09 AM, kakarukeys <kakarukeys@gmail.com> wrote:
> As requested, here are some output of the investigative queries, run
> when the problem occurred. I could see some locks there, but I don't
> know why the alter table add constraint takes so long of time.

It's pretty clear from the output you posted that it's waiting for a
lock, but you didn't include the full contents of pg_stat_activity and
pg_locks, so we can't see who has the lock it's waiting for.  Tom's
guess upthread is a good bet, though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Greg Smith
Дата:
Сообщение: pgbench to the MAXINT
Следующее
От: Dimitri Fontaine
Дата:
Сообщение: Re: MySQL HandlerSocket - Is this possible in PG?