升级到 16.04 后,Postgresql 9.4 出现故障

升级到 16.04 后,Postgresql 9.4 出现故障

升级后,postgresql 9.4 出现问题。如能得到帮助,我们将不胜感激。命令:

# /etc/init.d/postgresql start                        (04-29 14:52:01)
[ ok ] Starting postgresql (via systemctl): postgresql.service.
The appropriate log entries follow from /var/log/syslog:
Apr 29 14:52:13 igor systemd[1]: Starting PostgreSQL Cluster 9.4-main...
Apr 29 14:52:13 igor [email protected][2390]: Error: /var/lib/postgresql/9.4/main is not accessible or does not exist
Apr 29 14:52:13 igor systemd[1]: [email protected]: Control process exited, code=exited status=1
Apr 29 14:52:13 igor systemd[1]: Failed to start PostgreSQL Cluster 9.4-main.
Apr 29 14:52:13 igor systemd[1]: [email protected]: Unit entered failed state.
Apr 29 14:52:13 igor systemd[1]: [email protected]: Failed with result 'exit-code'.
Apr 29 14:52:13 igor systemd[1]: Started PostgreSQL RDBMS.

事实上,没有 /var/lib/postgresql/9.4/main。在升级到 16.04 之前,我的 postgres 安装在 14.04 上运行良好。

答案1

/var/lib/postgresql/9.4/main 目录应该存在。尝试重新安装 postgres。该服务要求主目录存在于安装目录中。

相关内容