Home > Blockchain >  how to take the database out of recovery mode?
how to take the database out of recovery mode?

Time:10-11

I need to take my PostgreSQL database out of recovery mode.

I have had to reinstall PostgreSQL using homebrew.

When I look to start the database using brew services start postgresql and then type psql postgres I receive the following error:

psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: the database system is in recovery mode

I receive the following error in the log:

Could not find relation mapping for relation "pg_database", OID 1262

How can I sort this out?

CodePudding user response:

You have to promote the instance as operating system user postgres:

/path/to/postgres/bin/pg_ctl promote -D /path/to/data/direcory
  • Related