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

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to