If completely wiping & reinstalling a Postgres DB, when running initdb like:
service postgresql-9.5 initdb -E 'UTF8' --pgdata="/foo/bar/"
you can encounter this service error:
Data directory is not empty! [FAILED]
To fix it (and this is the nuclear option -- all db data is wiped!)
On Amazon Linux (2014-x):
rm -rf /var/lib/pgsql9/data
On CentOS (6.x)
rm -rf /var/lib/pgsql/9.5/data
- 我的微信
- 这是我的微信扫一扫
-
- 我的微信公众号
- 我的微信公众号扫一扫
-