SELECT pg_terminate_backend(pid)
FROM pg_stat_activity
WHERE datname = 'mydb';
Created
December 21, 2021 16:31
-
-
Save rubenarakelyan/3fd43cb74f59063d58ee7876566b48b7 to your computer and use it in GitHub Desktop.
List of useful SQL commands for PostgreSQL
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment