본문 바로가기

개발자를 벗어나긴 글렀다./Trouble Shooting

[postgresql] 락 확인


조회

select * from pg_locks;

select * from pg_stat_activity;

select * from pg_stat_activity where state = 'active';


락 걸린 프로그램 취소

SELECT pg_cancel_backend(9228);