Skip to content

Instantly share code, notes, and snippets.

@mattes
Created July 9, 2017 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattes/f2c1f821a59d65b5c5095963707c4963 to your computer and use it in GitHub Desktop.
Save mattes/f2c1f821a59d65b5c5095963707c4963 to your computer and use it in GitHub Desktop.
SELECT * FROM pg_stat_activity WHERE client_port = -1;
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE client_port = -1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment