备库搭建后,进入备库报错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. Swift iOS 日期操作:NSDate、NSDateFormatter

    1.日期(NSDate) // 1.初始化 // 初始化一个当前时刻对象 var now = NSDate() // 初始化一个明天当前时刻对象 var tomorrow = NSDate(timeI ...

  2. PHP两个日期之间的所有日期

    我想得到两个日期之间的所有日期, 例如:输入两个日期,把这两个日期之间的所有日期取出来     如果是:2005-02-01至2005-02-05(同为一个月)     则为:2005-02-01,2 ...

  3. Xcode intellisense meaning of letters in colored boxes like f,T,C,M,P,C,K,# etc

    in Xcode this is called "Code Sense". And these icons also exist in Xcode 3. Red: macros # ...

  4. SQL查询练习一(From LeetCode)

     请选用MySQL进行测试. 1.找出后一天比前一天温度高的日期(E) 思路:将该表进行自关联,然后选择出日期靠后的一天,最后选择温度高的日期 select Weather.Id from Weath ...

  5. 使用js dom和jquery分别实现简单增删改

    <html><head> <meta http-equiv="Content-Type" content="text/html; chars ...

  6. python爬虫循环导入MySql数据库

    1.开发环境 操作系统:win10    Python 版本:Python 3.5.2   MySQL:5.5.53 2.用到的模块 没有的话使用pip进行安装:pip install xxx     ...

  7. PHP 个人用到的琐碎代码记录

    查找字符串出现次数的方法 substr_count(string,substring,[start],[length]) 函数延迟代码执行若干秒,若成功,返回 0,否则返回 false. sleep( ...

  8. PHP不使用任何内置函数实现字符串翻转

    实现字符串翻转PHP本身自带一个函数就可以解决,strrev函数.这里不适用任何内置函数实现字符串翻转 案例一(纯字母): $str = 'abcdefghig k'; //假设测试的字符串/g与k之 ...

  9. Nginx + uwsgi + django + websocket(dwebsocket)环境部署

    1.安装nginx(/export/servers/nginx/) 保证/export/servers/nginx/是nginx的安装目录 /export/servers/nginx/conf/dom ...

  10. 第I篇PCI体系结构概述

    PCI总线作为处理器系统的局部总线,主要目的是为了连接外部设备,而不是作为处理器的系统总线连接Cache和主存储器.但是PCI总线.系统总线和处理器体系结构之间依然存在着紧密的联系. PCI总线作为系 ...