Error while connecting psql to PostgreSQL 9.6 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
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.