Re: [GENERAL] How to find which query a waiting query waiting for?

2012-12-08 Thread wd
I know how to do this, thanks. On Fri, Dec 7, 2012 at 11:09 PM, Fabrízio de Royes Mello fabriziome...@gmail.com wrote: On Fri, Dec 7, 2012 at 1:02 PM, wd w...@wdicc.com wrote: hi, From pg_stat_activity I can find a query is at waiting state, and from pg_locks and pg_class can find which

[GENERAL] How to find which query a waiting query waiting for?

2012-12-07 Thread wd
hi, 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?

Re: [GENERAL] How to find which query a waiting query waiting for?

2012-12-07 Thread hubert depesz lubaczewski
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

Re: [GENERAL] How to find which query a waiting query waiting for?

2012-12-07 Thread Fabrízio de Royes Mello
On Fri, Dec 7, 2012 at 1:02 PM, wd w...@wdicc.com wrote: hi, 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? Maybe you found what you need here