Thread: pg_locks with users

pg_locks with users

From
"alexandre:"@smtp2.netsite.com.br:aldeia digital
Date:
Hi,

My Database have a lot of locks not granteds during a day.
I want to returns this from pg_locks:

All the not granted locks (user and table) and who is locking.
Like:

User    Granted    Table    PID
----    -------    -----    ---
Joe    f    foo    1212
frank    f    foo    4444
jeff    t    foo    3333
ann    f    bla    2121
frank    t    bla    4444
(...)

Thanks for any help.

Alexandre