Alexandre Arruda <alepaes(at)aldeiadigital(dot)com(dot)br> writes:
> But pg_stat_activity joined with pg_locks only give me informations
> about the lock itself.
> Realy, I want a (possible) simple information: Who is locking me ?
You need a self-join to pg_locks to find the matching lock that is held
(not awaited) by some process, then join that to pg_stat_activity to
find out who that is.
regards, tom lane