Re: How to find which query a waiting query waiting for?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: wd <wd(at)wdicc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to find which query a waiting query waiting for?
Date: 2012-12-07 15:06:02
Message-ID: 20121207150602.GA8074@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Dec 07, 2012 at 11:02:33PM +0800, wd wrote:
> From pg_stat_activity I can find a query is at waiting state, and from
> pg_locks and pg_class can find which relation the query is waiting for, But
> how to find witch query is lock the relation?

sipmply check which query has lock on the relation/transaction what your
query is waiting for.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2012-12-07 15:09:24 Re: How to find which query a waiting query waiting for?
Previous Message wd 2012-12-07 15:02:33 How to find which query a waiting query waiting for?