Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 593BB6326BE for ; Sun, 1 Mar 2009 15:34:10 -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 20817-10 for ; Sun, 1 Mar 2009 15:34:06 -0400 (AST) X-Greylist: delayed 00:12:09.730263 by SQLgrey-1.7.6 Received: from mail15.ca.com (mail15.ca.com [208.232.182.54]) by mail.postgresql.org (Postfix) with ESMTP id 813B66324FF for ; Sun, 1 Mar 2009 15:34:06 -0400 (AST) Received: from USILMS11.ca.com ([141.202.201.24]) by mail15.ca.com with Microsoft SMTPSVC(6.0.3790.3959); Sun, 1 Mar 2009 13:21:54 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C99AA2.FAD75298" Subject: Re: "slow" queries Date: Sun, 1 Mar 2009 14:21:54 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PERFORM] "slow" queries Thread-Index: Acmaj/yMxPviaA3cT+WF+a7NI9NcJAAEJ3dH References: <49A9F834.8060100@ca.com> <12688.1235927151@sss.pgh.pa.us> From: "Cox, Brian" To: "Tom Lane" Cc: X-OriginalArrivalTime: 01 Mar 2009 19:21:54.0573 (UTC) FILETIME=[FB2623D0:01C99AA2] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/10 X-Sequence-Number: 32932 This is a multi-part message in MIME format. ------_=_NextPart_001_01C99AA2.FAD75298 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable >Probably because the DROP is trying to acquire exclusive lock on its >target table, and some other transaction already has a read or write >lock on that table, and everything else is queuing up behind the DROP. >It's not a true deadlock that is visible to the database, or else >Postgres would have failed enough of the transactions to remove the >deadlock. Rather, what you've got is some very-long-running = transaction >that is still making progress, or else is sitting idle because its >client is neglecting to close it; and everything else is blocked behind >that. This "deadlock" finished after 18h and 48m. As there is only 1 select on a table with 400 rows and 10 inserts into a separate partition than the one being dropped, what could possible take 18:48 to do? I also don't understand why inserts into a separate partition or a = select on an unrelated table should cause any locks on the table being dropped in the 1st place. I assume that the CREATE VIEW, which started 1 hour after the DROP, can't possibly be the cause of this "deadlock". Brian ------_=_NextPart_001_01C99AA2.FAD75298 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: [PERFORM] "slow" queries

>Probably because the DROP is trying to acquire = exclusive lock on its
>target table, and some other transaction already has a read or = write
>lock on that table, and everything else is queuing up behind the = DROP.

>It's not a true deadlock that is visible to the database, or = else
>Postgres would have failed enough of the transactions to remove = the
>deadlock.  Rather, what you've got is some very-long-running = transaction
>that is still making progress, or else is sitting idle because = its
>client is neglecting to close it; and everything else is blocked = behind
>that.

This "deadlock" finished after 18h and 48m. As there is only 1 = select
on a table with 400 rows and 10 inserts into a separate partition = than
the one being dropped, what could possible take 18:48 to do?

I also don't understand why inserts into a separate partition or a = select on
an unrelated table should cause any locks on the table being dropped = in
the 1st place. I assume that the CREATE VIEW, which started 1 hour
after the DROP, can't possibly be the cause of this = "deadlock".

Brian

------_=_NextPart_001_01C99AA2.FAD75298--