FATAL: the database system is starting up - Postgres Streaming Replication
I was setting up streaming replication between two Postgresql servers in active passive mode. After the setup was done, I tried to connect to the slave node to see if everything works fine and received the following error:
FATAL: the database system is starting up
I was thinking for a while before I realized that I didn't set the slave node to hot_standby mode. It seems like a common mistake everyone does, so I thought of writing it down here hoping someone would find it useful.
If you get this error, this is what you have to do:
Open your postgresql.conf file.
vim /etc/postgresql/9.6/main/postgresql.conf
Locate the following
hot_standby = off
and change it as follows:
hot_standby = on
Save the file, then:
service postgresql restart
Now you can query your slave server ;)
0 comments :
Post a Comment