Re: can't CREATE TRIGGER

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: can't CREATE TRIGGER
Дата
Msg-id 20070122034120.GA61976@winnie.fuhr.org
обсуждение исходный текст
Ответ на can't CREATE TRIGGER  (gustavo halperin <ggh.develop@gmail.com>)
Список pgsql-general
On Mon, Jan 22, 2007 at 12:21:48AM +0200, gustavo halperin wrote:
> I can't create triggers, when I call for example:
> ficha=> CREATE TRIGGER TRG_persons_id AFTER INSERT ON ficha_ofperson
> ficha-> EXECUTE PROCEDURE add_person_id ( 'family_id', 'person_id' );
>
> , the creation never finish and finally, after many minutes, I kill the
> creation with Ctrl+c.

You probably have an open transaction with a lock on ficha_ofperson,
so the CREATE TRIGGER statement blocks until that lock is released.
Query pg_locks to see what transaction that is.  Make sure your
applications don't keep transactions open longer than necessary.

--
Michael Fuhr

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

Предыдущее
От: "Jaime Casanova"
Дата:
Сообщение: Re: can't CREATE TRIGGER
Следующее
От: Chris
Дата:
Сообщение: Re: help me to solve the problem