Skip to content

Instantly share code, notes, and snippets.

@whyvez
Created May 27, 2015 01:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whyvez/bce602c015b0f83b7879 to your computer and use it in GitHub Desktop.
Save whyvez/bce602c015b0f83b7879 to your computer and use it in GitHub Desktop.
PG conections
-- get pid for db
SELECT state, client_addr, pid FROM pg_stat_activity where datname = 'afgo_qa';
-- kill pid for db
SELECT pg_terminate_backend(12193);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment