Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id DE15B6330CB for ; Mon, 2 Mar 2009 16:36:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 06355-06 for ; Mon, 2 Mar 2009 16:36:50 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.ca.com (smtp2.ca.com [141.202.248.13]) by mail.postgresql.org (Postfix) with ESMTP id 162E4633892 for ; Mon, 2 Mar 2009 16:36:49 -0400 (AST) Received: from athena.ca.com ([130.200.164.17]) by smtp2.ca.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 2 Mar 2009 15:36:48 -0500 Message-ID: <49AC4351.8050307@ca.com> Date: Mon, 02 Mar 2009 12:36:33 -0800 From: Brian Cox User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: "Tom Lane [tgl@sss.pgh.pa.us]" CC: "pgsql-performance@postgresql.org" Subject: Re: "slow" queries Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 02 Mar 2009 20:36:48.0206 (UTC) FILETIME=[9BF9DEE0:01C99B76] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/18 X-Sequence-Number: 32940 Tom Lane [tgl@sss.pgh.pa.us] wrote: > Well, that's certainly a sufficient reason, if perhaps not the only > reason. Dropping ts_defects_20090227 will require removal of FK triggers > on ts_transets, and we can't do that concurrently with transactions that > might be trying to fire those triggers. > > Now admittedly, it would probably be sufficient to take ExclusiveLock > rather than AccessExclusiveLock when removing triggers, since we do not > have triggers ON SELECT. Right now though, we just take > AccessExclusiveLock for most any DDL on a table. There was a patch > submitted last fall to reduce DDL locking in some cases, but it hasn't > been reworked to fix the problems that were pointed out (and I > disremember if it addressed DROP TRIGGER in particular anyway). > > regards, tom lane Thanks for furthering my understanding of postgres (and probably other SQL servers as well). I can fix this problem easily. Brian