Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save commondatageek/dfa82e50075031fd48cf11e2895c0656 to your computer and use it in GitHub Desktop.
Save commondatageek/dfa82e50075031fd48cf11e2895c0656 to your computer and use it in GitHub Desktop.
postgresql kill query
-- see running queries
select * from pg_stat_activity;
-- Find the process you want to kill, then type:
select pg_cancel_backend(<pid of the process>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment