Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 9B3E16330CB for ; Mon, 2 Mar 2009 15:29:39 -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 27229-07 for ; Mon, 2 Mar 2009 15:29:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E7196632987 for ; Mon, 2 Mar 2009 15:29:34 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n22JTVrL022228; Mon, 2 Mar 2009 14:29:32 -0500 (EST) To: Brian Cox cc: "pgsql-performance@postgresql.org" Subject: Re: "slow" queries In-reply-to: <49AC23FF.9070103@ca.com> References: <49AC23FF.9070103@ca.com> Comments: In-reply-to Brian Cox message dated "Mon, 02 Mar 2009 10:22:55 -0800" Date: Mon, 02 Mar 2009 14:29:31 -0500 Message-ID: <22227.1236022171@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/15 X-Sequence-Number: 32937 Brian Cox writes: > select locktype,database,relation,virtualxid,virtualtransaction,pid,mode > from pg_locks order by mode; If you hadn't left out the "granted" column we could be more sure, but what it looks like to me is the DROP (pid 13842) is stuck behind the transaction (pid 13833). In particular these two rows of pg_locks look like a possible conflict: > relation | 26472437 | 26472508 | | 15/69749 > | 13842 | AccessExclusiveLock > relation | 26472437 | 26472508 | | 11/131 > | 13833 | AccessShareLock regards, tom lane