Re: "slow" queries

From: Tom Lane
Subject: Re: "slow" queries
Date: ,
Msg-id: 12688.1235927151@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: "slow" queries  (Brian Cox)
List: pgsql-performance

Tree view

"slow" queries  (Brian Cox, )
 Re: "slow" queries  (Robert Haas, )
 Re: "slow" queries  (Tom Lane, )
 Re: "slow" queries  ("Cox, Brian", )
  Re: "slow" queries  (Tom Lane, )
 Re: "slow" queries  (Brian Cox, )
  Re: "slow" queries  (Scott Carey, )
  Re: "slow" queries  (Robert Haas, )
  Re: "slow" queries  (Tom Lane, )
   Re: "slow" queries  (Tim Bunce, )
    Re: "slow" queries  (Scott Marlowe, )
 Re: "slow" queries  (Brian Cox, )
  Re: "slow" queries  (Tom Lane, )
 Re: "slow" queries  (Brian Cox, )

Brian Cox <> writes:
> Actually, they're all deadlocked. The question is why?

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.

If it is not clear to you exactly who is waiting for what, a look into
the pg_locks view might help.

            regards, tom lane


pgsql-performance by date:

From: "Cox, Brian"
Date:
Subject: Re: "slow" queries
From: Tom Lane
Date:
Subject: Re: "slow" queries