备库搭建后,进入备库报错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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App