If you don't have a DB yet:
Initializing the DB cannot be done via "service postgresql initdb"
This is because postgresql startup scripts were ported to systemd,
You can init the DB via postgres-setup tool:
sudo postgresql-setup initdb
If you have an existing DB:
- Seems like Postgres 9.1.1 is incompatible with the new Postgres 9.1.1 DB, so if you have an existing postgres data, the postgres server service would probably fail to start due to:
"(The data directory was initialized by PostgreSQL version 9.0, which is not compatible with this version 9.1.1.)"
You can fix this by invoking the upgrade script:
sudo yum install postgresql-upgrade
sudo postgresql-setup upgrade
Redirecting to /bin/systemctl stop postgresql.service
Upgrading database: OK
See /var/lib/pgsql/pgupgrade.log for details.
Then start the service with:
systemctl start postgresql.service
systemctl status postgresql.service
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled)
Active: active (running) since ....
Asaf.
No comments:
Post a Comment