I am using Postgresql 9.6 and getting an error while connecting psql. Error- ./psql
psql.bin: FATAL: the database system is starting up. What could be the issue?
In the log it says
2021年02月18日 13:23:31.311 IST [85845]: [-] db=,user= LOG: started streaming WAL from primary at 3FC/91000000 on timeline 2
2021年02月18日 13:23:31.312 IST [85845]: [-] db=,user= FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 00000002000003FC00000091 has already been removed
1 Answer 1
Your standby server has been down long enough that the primary doesn't have the required transaction log information any more. In addition, the standby was not shut down cleanly.
You will have to remove the standby server and rebuild it from scratch, unless you have a WAL archive that still contains the required segments.
Consider using replication slots next time to avoid that problem.
-
In the log it says - 2021年02月18日 13:23:31.311 IST [85845]: [-] db=,user= LOG: started streaming WAL from primary at 3FC/91000000 on timeline 2 2021年02月18日 13:23:31.312 IST [85845]: [-] db=,user= FATAL: could not receive data from WAL stream: ERROR: requested WAL segment 00000002000003FC00000091 has already been removedkruthi prabhu– kruthi prabhu2021年02月18日 07:55:53 +00:00Commented Feb 18, 2021 at 7:55
-
And the hot_standby is on in slave postgres.confkruthi prabhu– kruthi prabhu2021年02月18日 07:56:25 +00:00Commented Feb 18, 2021 at 7:56