bash-4.2$ /usr/pgsql-10/bin/pg_upgrade --old-bindir=/usr/bin/ --new-bindir=/usr/pgsql-10/bin/ --old-datadir=/var/lib/pgsql/data/ --new-datadir=/var/lib/pgsql/10/data/ --check
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 on Unix domain socket "/var/lib/pgsql/.s.PGSQL.50432"?
could not connect to source postmaster started with the command:
"/usr/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data/" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directory='/var/lib/pgsql'" start
Failure, exitingtail /var/lib/pgsql/pg_upgrade_server.log给了我:
server stopped
command: "/usr/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data/" -o "-p 50432 -b -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directory='/var/lib/pgsql'" start >> "pg_upgrade_server.log" 2>&1
waiting for server to start....
FATAL: unrecognized configuration parameter "unix_socket_directory"
stopped waiting
pg_ctl: could not start server
Examine the log output.我怎么解决这个问题?
发布于 2020-02-19 14:01:13
pg_ctl必须调用错误的postgres二进制文件。
PostgreSQL版本9.2有一个参数unix_socket_directory,该参数不再存在(现在有unix_socket_directories )。因此,9.2服务器将不会因此消息而死亡。
您的PostgreSQL 9.2二进制文件是否真的安装在/usr/bin中,还是pg_ctl只有一个符号链接或脚本?
尝试找到9.2安装中的postgres可执行文件所在的目录,并与--old-bindir of pg_upgrade一起使用该目录。
https://dba.stackexchange.com/questions/260029
复制相似问题