以前没咋用过 linux 。最近用一个两年没 syu 的 archlinux 服务器,装啥都出奇怪的问题,但也不敢升级,上面跑着好多东西呢,怕出问题。刚才实在忍不了了,战战兢兢的 pacman -syu 了,结果,当真, owncloud 挂了,分析是由于 postgresql 挂了引起的。求助,哪位能指点一下么。。
还有,如果删除再重装 pgsql 的话,原来的数据库咋保留?网上查的都是在服务运行的状态下 dump ,再升到高版本的 reload ,可我已经升级了,并且服务也不启动了。
# systemctl start postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
# systemctl status postgresql.service
postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-04-14 02:09:00 ; 7min ago
Process: 26394 ExecStop=/usr/bin/pg_ctl -s -D ${PGROOT}/data stop -m fast (code=exited, status=0/SUCCESS)
Process: 5814 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGROOT}/data (code=exited, status=1/FAILURE)
Main PID: 17344 (code=exited, status=0/SUCCESS)
Apr 14 02:09:00
xxx.xxx systemd[1]: Starting PostgreSQL database server...
Apr 14 02:09:00
xxx.xxx postgres[5814]: An old version of the database format was found.
Apr 14 02:09:00
xxx.xxx postgres[5814]: You need to dump and reload before using PostgreSQL 9.6.
Apr 14 02:09:00
xxx.xxx postgres[5814]: See
http://www.postgresql.org/docs/9.6/static/upgrading.htmlApr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Control process exited, code=exited status=1
Apr 14 02:09:00
xxx.xxx systemd[1]: Failed to start PostgreSQL database server.
Apr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Unit entered failed state.
Apr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Failed with result 'exit-code'.
# journalctl -xe
Unit postgresql.service has begun starting up.
Apr 14 02:09:00
xxx.xxx postgres[5814]: An old version of the database format was found.
Apr 14 02:09:00
xxx.xxx postgres[5814]: You need to dump and reload before using PostgreSQL 9.6.
Apr 14 02:09:00
xxx.xxx postgres[5814]: See
http://www.postgresql.org/docs/9.6/static/upgrading.htmlApr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Control process exited, code=exited status=1
Apr 14 02:09:00
xxx.xxx systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support:
http://lists.freedesktop.org/mailman/listinfo/systemd-devel--
-- Unit postgresql.service has failed.
--
-- The result is failed.
Apr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Unit entered failed state.
Apr 14 02:09:00
xxx.xxx systemd[1]: postgresql.service: Failed with result 'exit-code'.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/354746
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.