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 [1]. [1] http://wiki.postgresql.org/wiki/Lock_Monitoring -- Fabrízio de Royes Mello Consultoria/Coaching PostgreSQL >> Blog sobre TI: http://fabriziomello.blogspot.com >> Perfil Linkedin: http://br.linkedin.com/in/fabriziomello >> Twitter: http://twitter.com/fabriziomello