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