Postgresql fails to start: "An old version of the database format was found"

Refers to:

  • Plesk 11.0 for Linux

Created:

2016-11-16 12:42:06 UTC

Modified:

2016-12-21 19:00:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Postgresql fails to start: "An old version of the database format was found"

Symptoms

Postgresql service cannot start with the following error:

An old version of the database format was found. You need to upgrade the data format before using PostgreSQL.

Resolution

Check if any databases are attached to pgSQL:

#  MYSQL_PWD=`cat /etc/psa/.psa.shadow`  mysql -uadmin  mysql -uadmin

mysql> select * from DatabaseServers;
+----+-----------+------+------------+-------------+----------------+---------------------+----------------+
| id | host      | port | type       | admin_login | admin_password | last_error          | server_version |
+----+-----------+------+------------+-------------+----------------+---------------------+----------------+
|  1 | localhost | 3306 | mysql      | admin       | ********       | no_error            | 5.0.68         |
|  2 | localhost | 5432 | postgresql |             |                | credentials_not_set |                |
+----+-----------+------+------------+-------------+----------------+---------------------+----------------+
2 rows in set (0.00 sec)

mysql> select * from data_bases where db_server_id=2;
Empty set (0.00 sec)``

If there are no databases, you may safely re-initialize the Postgres engine:

# mv /var/lib/pgsql/data{,.back}
/bin/su -s /bin/sh -l postgres -c '/usr/bin/initdb -E UTF8 --pgdata=/var/lib/pgsql-root/var/lib/pgsql/data'

# /etc/init.d/postgresql start
Initializing database:                                     [  OK  ]
Starting postgresql service:                               [  OK  ]

After that, you need to specify administrative credentials for the PgSQL server in the Parallels Plesk Panel web interface. The problem should be fixed now.

Have more questions? Submit a request
Please sign in to leave a comment.