AWS EC2 linux上的pg_upgrade - pg_hba.conf设置

时间:2015-06-12 16:54:59

标签: linux postgresql amazon-web-services amazon-ec2 pg-upgrade

我正在运行预装了PostgreSQL 8.4.20服务器的Amazon EC2 CentOS 6.6服务器实例,我希望通过SSH使用pg_upgrade升级到9.4.1。

到目前为止我做了什么:下载并安装PostgreSQL 9.4.1和yum,配置它。将postgres用户配置为在UNIX服务器和两个数据库实例上具有相同的密码。两个数据库实例都正常运行 - 端口5432上的旧实例,5433上的新实例。

我想做什么:

su - postgres
/usr/pgsql-9.4/bin/pg_upgrade 
    -b /usr/bin/ 
    -B /usr/pgsql-9.4/bin/ 
    -d /var/lib/pgsql/data/ 
    -D /var/lib/pgsql/9.4/data/

这是pg_hba.conf的问题。使用

  

类型数据库用户方法
  本地人都信任

  

类型数据库用户方法
  本地所有同行

我无法启动旧服务器,获取:

Performing Consistency Checks
-----------------------------
Checking cluster versions                                   ok
connection to database failed: fe_sendauth: no password supplied

Failure, exiting

使用默认设置

  

类型数据库用户方法
  本地所有身份

是允许我启动服务器的唯一方法,但后来我收到以下错误:

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 "/tmp/.s.PGSQL.50432"?


could not connect to old postmaster started with the command:
"/usr/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/pgsql/data/" -o "-p 50432 -c autovacuum=off -c autovacuum_freeze_max_age=2000000000  -c listen_addresses='' -c unix_socket_permissions=0700" start
Failure, exiting

我一直在阅读超过10个小时的相关内容,在我发布之前,但似乎无法找到解决方案。如果你能给我任何提示,将非常感激。

0 个答案:

没有答案