pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Williamson <gwilliamson39@yahoo.com>
Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: creating trigger in 8.3 -- very slow
Date: Wed, 22 Aug 2012 21:45:06 -0400
Message-ID: <27813.1345686306@sss.pgh.pa.us> (raw)
In-Reply-To: <1345684578.14923.YahooMailNeo@web125904.mail.ne1.yahoo.com>
References: <1345684578.14923.YahooMailNeo@web125904.mail.ne1.yahoo.com>

Greg Williamson <gwilliamson39@yahoo.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




view thread (2+ messages)

Message-ID: <27813.1345686306@sss.pgh.pa.us>
Permalink:  ../27813.1345686306@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27813.1345686306@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gwilliamson39@yahoo.com
  Subject: Re: creating trigger in 8.3 -- very slow
  In-Reply-To: <27813.1345686306@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox