备库搭建后,进入备库报错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. Mysql查询某字段值重复的数据

    查询user表中,user_name字段值重复的数据及重复次数 select user_name,count(*) as count from user group by user_name havi ...

  2. P2P技术如何将实时视频直播带宽降低75%?

    本文内容来自学霸君资深架构师袁荣喜的技术分享. 1.前言 实时视频直播经过去年的千播大战后已经成为互联网应用的标配技术,但直播平台的成本却一直居高不下,各个平台除了挖主播.挖网红以外,其背后高额的带宽 ...

  3. Duilib第一步(I)-简介与环境搭建

    Primus gradus et cognoscetis veritatem et veritas liberabit vos.  --Johannes 8:32 Introduction Duili ...

  4. EmguCV 绘画图形

    1.Image类中绘图常用函数列表 实践验证 ///初始化图片 private void Form1_Load(object sender, EventArgs e) { oldpic = new E ...

  5. 如何高效的编写Verilog HDL——进阶版

    博主之前写过一篇文章来谈论如何高效的编写Verlog HDL——菜鸟版,在其中主要强调了使用Notepad++来编写Verilog HDL语言的便捷性,为什么说是菜鸟版呢,因为对于新手来说,在还没有熟 ...

  6. yaf代码生成工具的使用

    具体步骤如下: 1.下载php-yaf源码: git clone https://github.com/laruence/php-yaf/ 2.运行代码生成工具: /Users/helloxiaozh ...

  7. session 与 coolie 的区别与联系

    cookie 和session 的区别: session 在服务器端,cookie 在客户端(浏览器) cookie不是很安全,别人可以分析存放在本地的COOKIE并进行COOKIE欺骗考虑到安全应当 ...

  8. 恢复Mysql丢失的root用户权限

      今天安装了某个程序时, 由于程序很傻X的 新建了一个 root@localhost 用户 并把 root权限全部改为了 no 这下 我也 傻X 了.服务器上所有程序都崩溃了. 此时即使用root用 ...

  9. shell脚本 sed工具

    sed工具概述(流式编辑器)非交互,基于模式匹配过滤及修改文本逐行处理,并将结果输出到屏幕可实现对文本的输出,增,删,改,查等各种操作 sed流控制:!:取反操作,根据定址条件取反n:读下一行,产生隔 ...

  10. JavaScript操作符汇总

    操作符 JavaScript 有赋值.比较.算术.位.逻辑.字符串和特殊运算符.本章描述了操作符,以及关于操作符优先级的一些信息. 表 2.1 JavaScript 所有操作符简明列表. 表 2.1 ...