select pid from pg_stat_activity where DATNAME = 'template1';it
pid --------- 8879select
kill 8879activity