Skip to content

Instantly share code, notes, and snippets.

@geunho
Created May 2, 2022 09:56
Show Gist options
  • Save geunho/dbebcb8cc9ba70a8fa52dc187b54e0a0 to your computer and use it in GitHub Desktop.
Save geunho/dbebcb8cc9ba70a8fa52dc187b54e0a0 to your computer and use it in GitHub Desktop.
실행중인, blocking된 쿼리 목록 조회
select pid,
usename,
pg_blocking_pids(pid) as blocked_by,
query as blocked_query
from pg_stat_activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment