我正在尝试将 Ubuntu Server 上的 PostgreSQL 从 9.6 升级到 10。这是我第一次这样做。服务器尚不包含任何有用的数据,但我想确保下次我可以正确执行此操作。
运行 pg_upgrade 脚本:
须藤 -u postgres /usr/lib/postgresql/10/bin/pg_upgrade -b /usr/lib/postgresql/9.6/bin -B /usr/lib/postgresql/10/bin -d /var/lib/postgresql/9.6 /main/ -D /var/lib/postgresql/10/main/
这是控制台输出:
Performing Consistency Checks
-----------------------------
Checking cluster versions ok
*failure*
Consult the last few lines of "pg_upgrade_server.log" for
the probable cause of the failure.
connection to database failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections …Run Code Online (Sandbox Code Playgroud) postgresql ×1