备库搭建后,进入备库报错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
 
 

备库搭建后,进入备库报错psql: FATAL: the database system is starting up的更多相关文章

  1. 配置recovery_min_apply_delay后重启standby节点报错:psql: FATAL: the database system is starting up

    环境: pg版本:PostgreSQL 9.4.4 on x86_64 系统版本:CentOS release 6.6 linux内核版本:2.6.32-504.8.1.el6.x86_64 今天测试 ...

  2. SSM框架搭建后在tomcat部署报错lineNumber: 15; columnNumber: 59; 必须为元素类型 "beans" 声明属性 "xmlns"

    删除applicationContext.xml中的文件头上的这个就可以<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" &q ...

  3. FastDFS整合nginx后,nginx一直报错

    FastDFS整合nginx后,nginx一直报错: 报错内容: [2018-06-11 09:41:21] ERROR - file: ../common/fdfs_http_shared.c, l ...

  4. 普通的jdbc事务在插入数据后 下面的代码报错时 数据不会回滚 但是 spring的事务会回滚

    普通的jdbc事务在插入数据后 下面的代码报错时 数据不会回滚 但是 spring的事务会回滚

  5. Django_重装系统后无法使用 sqlite 数据库报错:com.intellij.execution.ExecutionException: Exception in thread "main" java.lang.ClassNotFoundException: org.sqlite.JDBC

     重装系统后无法使用 sqlite 数据库报错 报错 : com.intellij.execution.ExecutionException: Exception in thread "ma ...

  6. Python3安装Celery模块后执行Celery命令报错

    1 Python3安装Celery模块后执行Celery命令报错 pip3 install celery # 安装正常,但是执行celery 命令的时候提示没有_ssl模块什么的 手动在Python解 ...

  7. Hadoop0.20.203.0在关机重启后,namenode启动报错(/dfs/name is in an inconsistent state)

    Hadoop0.20.203.0在关机重启后,namenode启动报错: 2011-10-21 05:22:20,504 INFO org.apache.hadoop.hdfs.server.comm ...

  8. Springboot项目 配置数据库连接属性后,启动项目报错

    Springboot项目 配置数据库连接属性后,启动项目报错,错误如下: 错误原因分析: 1.连接信息配置错误 当使用properties为配置文件时,如图所示,上面的 spring.datasour ...

  9. git报错:'fatal:remote origin already exists

    git报错:'fatal:remote origin already exists'怎么处理?附上git常用操作以及说明.   git添加远程库的时候有可能出现如下的错误, 怎么解决? 只要两步: 1 ...

随机推荐

  1. llinux基本指令

    1.关机重启1)关机shutdown -h now (立刻关机)shutdown -h 5 (5分钟后关机)2)重启shutdown -r now (立刻重启)shutdown -r 5 (5分钟后重 ...

  2. git ssh 配置

    创建并切换到 ~/.ssh(存在就直接切换过去) 运行 ssh-keygen 创建 rsa 文件 复制 .pub 的文件内容,添加到网站的公钥列表 Git\etc\ssh\ssh_config 中添加 ...

  3. spring注解-@Transactional事务几点注意

    这里面有几点需要大家留意:A. 一个功能是否要事务,必须纳入设计.编码考虑.不能仅仅完成了基本功能就ok.B. 如果加了事务,必须做好开发环境测试(测试环境也尽量触发异常.测试回滚),确保事务生效.C ...

  4. SVN高级

    #查找有关svn关键字的目录及文件 find / -name "*svn*" find / -name "*Svn*" find / -name "* ...

  5. Service工作过程

    Service两种工作状态的作用 1)启动状态:用于执行后台计算 2)绑定状态:用于其他组件和Service的交互 注意:Service这两种状态可以共存,即Service既可以处于启动状态也可以同时 ...

  6. FZU - 2150 bfs [kuangbin带你飞]专题一

    题意:两个人玩很变态的游戏,将一个草坪的某两个点点燃,点燃的草坪可以向上下左右四个方向扩散,问能否将整块草坪上面的草都点燃.如果能,输出最短时间(^_^他们就能玩更变态的游戏了),如果不能,输出-1. ...

  7. javascript 面向对象(多种创建对象的方式)

    创建对象 第一种:基于Object对象 var person = new Object(); person.name = 'My Name'; person.age = 18; person.getN ...

  8. Linux CentOS 安装MySql以及搭建MySql主从复制

    前言 在之前的博客中,有过几篇都写了关于mysql在linux下的搭建教程,可能以后还会再写,但是又不想重复在写, 于是便想单独将此抽出来,单独写成一篇博客,并详细记录一些安装过程以及遇到的问题解决办 ...

  9. 转 Caffe学习系列(2):数据层及参数

    http://www.cnblogs.com/denny402/p/5070928.html 要运行caffe,需要先创建一个模型(model),如比较常用的Lenet,Alex等, 而一个模型由多个 ...

  10. R︱Linux+Rstudio Server尝鲜笔记(打造最佳Rstudio体验+报错的解决方案)

    Rstudio Server 是Rstudio开发的基于R语言的网页版(只能在Linux),你在手机上都可以运行R,还是挺方便的.就是配置起来有点麻烦.      官方下载链接:https://www ...