Discussion:
creating trigger in 8.3 -- very slow
(too old to reply)
Greg Williamson
2012-08-23 01:16:18 UTC
Permalink
I've got a fairly large table (186 million rows) that is moderately busy ( a few inserts per second at most) that I am trying to create a trigger on --  it is just hanging.

Can this be done in 8.3 ? Will it eventually complete ? 

Thanks for any advice, information, etc.!

Greg Williamson
Tom Lane
2012-08-23 01:45:06 UTC
Permalink
Post by Greg Williamson
I've got a fairly large table (186 million rows) that is moderately busy ( a few inserts per second at most) that I am trying to create a trigger on --  it is just hanging.
CREATE TRIGGER per se is pretty quick ... but it requires an exclusive
lock on the table. Most likely your problem is that it's backed up
behind existing holders of locks. The pg_locks view should help you
figure out what's blocking it.

regards, tom lane
--
Sent via pgsql-admin mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Loading...