Search Postgresql Archives

Re: can't CREATE TRIGGER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux