Quickly close database connections on the command line
One slightly annoying thing about Postgres over MySQL is that trying to reset a database with
rake db:migrate:reset
To get around this you can quickly kill all connections with this command:
ps x -o pid,command | grep postgres | grep my_database | cut -f 1 -d " " | xargs kill



