A couple of views I find useful when investigating Postgres issues. (Supports Postgres 9.2 and up.) See also: http://wiki.postgresql.org/wiki/Lock_Monitoring