psql: FATAL: the database system is starting up
Posted 丹心明月
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了psql: FATAL: the database system is starting up相关的知识,希望对你有一定的参考价值。
pg9.6.1
在搭建同步流复制的standby库时,启动备库时,报错:
[postgres@pghs ~]$ psql
psql: FATAL: the database system is starting up
后经检查,是postgresql.conf中hot_standby没有设置:
hot_standby = on
成功:
[postgres@pghs ~]$ psql
psql (9.6.1)
Type "help" for help.
postgres=#
后经大神提点,在执行psql报错的时候,并非是启动备库时,只是是在连接备库时,此时备库时正常的,只是连不上:
[postgres@pghs datass]$ psql
psql: FATAL: the database system is starting up
[postgres@pghs datass]$ ps -ef | grep postgres
root 1822 1777 0 01:00 pts/0 00:00:00 su - postgres
postgres 1823 1822 0 01:00 pts/0 00:00:00 -bash
postgres 1873 1823 0 01:01 pts/0 00:00:00 psql
root 3962 3942 0 14:35 pts/2 00:00:00 su - postgres
postgres 3963 3962 0 14:35 pts/2 00:00:00 -bash
postgres 4084 1 0 14:41 pts/2 00:00:00 /usr/pg/postgresql-9.6.1/bin/postgres -D /PostgreSQL/9.6.1/datass
postgres 4085 4084 0 14:41 ? 00:00:00 postgres: logger process
postgres 4086 4084 0 14:41 ? 00:00:00 postgres: startup process recovering 000000010000000000000015
postgres 4087 4084 0 14:41 ? 00:00:00 postgres: checkpointer process
postgres 4088 4084 0 14:41 ? 00:00:00 postgres: writer process
postgres 4096 3963 0 14:42 pts/2 00:00:00 ps -ef
postgres 4097 3963 0 14:42 pts/2 00:00:00 grep postgres
[postgres@pghs datass]$ netstat -a | grep PGSQL
unix 2 [ ACC ] STREAM LISTENING 19502 /tmp/.s.PGSQL.5432
[postgres@pghs datass]$
以上是关于psql: FATAL: the database system is starting up的主要内容,如果未能解决你的问题,请参考以下文章
psql: FATAL: the database system is starting up
psql: FATAL: database "" does not exist 解决步骤
Heroku “psql: FATAL: 剩余的连接槽是为非复制超级用户连接保留的”
Forgotten psql Password: sql: FATAL: password authentication failed for user "username"
PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误