Re: creating trigger in 8.3 -- very slow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: creating trigger in 8.3 -- very slow
Date: 2012-08-23 01:45:06
Message-ID: 27813.1345686306@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Greg Williamson <gwilliamson39(at)yahoo(dot)com> writes:
> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Kouber Saparev 2012-08-23 07:59:56 Does pg_reset_stats() influence autovacuum?
Previous Message Greg Williamson 2012-08-23 01:16:18 creating trigger in 8.3 -- very slow