Start med at tjekke ind i systemvisning pg_locks. http://www.postgresql.org/docs/8.4 /interactive/view-pg-locks.html