Detect deadlocks in postgres.