From: Cox, Brian <Brian.Cox@ca.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: "slow" queries
Date: Sun, 1 Mar 2009 14:21:54 -0500
Message-ID: <D181508F0DF4C247B57FDD88B342C110046DC10E@USILMS11.ca.com> (raw)
References: <49A9F834.8060100@ca.com>
<12688.1235927151@sss.pgh.pa.us>
>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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: Brian.Cox@ca.com, tgl@sss.pgh.pa.us
Subject: Re: "slow" queries
In-Reply-To: <D181508F0DF4C247B57FDD88B342C110046DC10E@USILMS11.ca.com>
References: <49A9F834.8060100@ca.com> <12688.1235927151@sss.pgh.pa.us> <D181508F0DF4C247B57FDD88B342C110046DC10E@USILMS11.ca.com>
* 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