备库搭建后,进入备库报错psql: FATAL: the database system is starting up

 
 
备库搭建后,进入备库报错psql: FATAL:  the database system is starting up
  原因:备库配置文件没有hot_standby = on
 
master
-bash-4.1$ ps aux |grep post
postgres  89707  0.0  0.0 43196188 2872 ?       Ss   00:15   0:27 postgres: wal sender process rep 10.40.55.69(26717) streaming 9F6/E1DCC0D8
 
slave
[root@db-hx-55-69 bohai]# ps aux|grep post                        
postgres 14020  0.3 29.0 43132932 19181752 ?   Ss   00:15   4:26 postgres: startup process   recovering 00000001000009F6000000E7                                 
postgres 14055  0.1  0.0 43137588 2204 ?       Ss   00:15   1:23 postgres: wal receiver process   streaming 9F6/E7F52960      
 
[postgres@db-hx-55-69 ~]$ psql
psql: FATAL:  the database system is starting up
 
[postgres@db-hx-55-69 pg_log]$ tail -f  postgresql-Sat.log
< 2018-03-10 22:59:51.188 CST >FATAL:  the database system is starting up
 
 
 
[postgres@db-hx-55-69 data]$ vi  postgresql.conf
hot_standby = on
 
[postgres@db-hx-55-69 data]$ pg_ctl restart  -D /opt/tuniu/postgresql/data  
< 2018-03-10 23:14:30.391 CST >LOG:  received fast shutdown request
< 2018-03-10 23:14:30.391 CST >FATAL:  terminating walreceiver process due to administrator command
< 2018-03-10 23:14:30.771 CST >LOG:  shutting down
< 2018-03-10 23:14:30.772 CST >LOG:  database system is shut down
< 2018-03-10 23:14:34.263 CST >LOG:  database system was shut down in recovery at 2018-03-10 23:14:30 CST
< 2018-03-10 23:14:34.263 CST >LOG:  entering standby mode
< 2018-03-10 23:14:34.264 CST >LOG:  redo starts at 9F6/C4395020
< 2018-03-10 23:14:37.272 CST >FATAL:  the database system is starting up
< 2018-03-10 23:14:39.167 CST >FATAL:  the database system is starting up
< 2018-03-10 23:14:44.326 CST >LOG:  consistent recovery state reached at 9F6/FF6393F0
< 2018-03-10 23:14:44.326 CST >LOG:  invalid resource manager ID 255 at 9F6/FF6393F0
< 2018-03-10 23:14:44.327 CST >LOG:  database system is ready to accept read only connections
< 2018-03-10 23:14:44.330 CST >LOG:  started streaming WAL from primary at 9F6/FF000000 on timeline 1
 
[postgres@db-hx-55-69 data]$ psql
psql (9.5.4)
Type "help" for help.
postgres=# \l
 
 

转载于:https://www.cnblogs.com/bohai1/p/8542714.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值