Skip to content

Instantly share code, notes, and snippets.

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 upbeta01/899eac5efc74a5c316b1fa922bdfbc28 to your computer and use it in GitHub Desktop.
Save upbeta01/899eac5efc74a5c316b1fa922bdfbc28 to your computer and use it in GitHub Desktop.
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pg_stat_activity.pid <> pg_backend_pid();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment