A bozo's blog
select distinct pid, count(*) over (partition by pid) as count from pg_locks
select * from pg_stat_activity where pid = 119254