Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

postgres kill all connections

SELECT 
    pg_terminate_backend(pid) 
FROM 
    pg_stat_activity 
WHERE 
    pid <> pg_backend_pid()
    AND datname = 'database_name';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #postgres #kill #connections
ADD COMMENT
Topic
Name
4+7 =