본문 바로가기
서버/DB

postgresql lock 테이블 조회 및 kill

by 아카이sun 2023. 4. 19.

lock 테이블 조회

select  
	b.relname,
	a.locktype,
	page,
	virtualtransaction,
	pid,
	mode,
	granted
from pg_locks a, pg_stat_all_tables b
where a.relation = b.relid
order by relation asc;

process kill

select pg_cancel_backend(pid);

'서버 > DB' 카테고리의 다른 글

오라클 복구 쿼리  (0) 2024.01.31
postgresql sequence 사용하기  (70) 2023.08.24
postgresql dump & restore  (0) 2023.02.16
오라클 connect by level 사용법  (0) 2022.02.15
Maximum execution time of 120 seconds exceeded  (0) 2021.11.04

댓글