This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# replace your_db with the name of your database | |
psql postgres -c "select pg_terminate_backend(procpid) from pg_stat_activity where datname='your_db';" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psql postgres -c "select pg_terminate_backend(procpid) from pg_stat_activity where datname='your_db';" | |
dropdb your_db | |
createdb --template=template0 --encoding=unicode your_db | |
No comments:
Post a Comment