kareem-h
3/21/2015 - 2:44 AM

Kill a postgres database that has gone mad.

Kill a postgres database that has gone mad.

ps xa | grep postgres: | grep $POSTGRESQL_DATABASE | grep -v grep | awk '{print $1}' | sudo xargs
kill

# replace $POSTGRESQL_DATABASE with the database you want to kill.