Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Postgresql promoting slave server to master

$
0
0

I am trying to setup Postgresql(9.4) master-slave cluster. I am using the following tutorial: http://linux.xvx.cz/2014/10/loadbalancing-of-postgresql-databases.html

The issue I am facing at the moment is I am not able to promote the slave to master after shutting down the master. The command I am running to promote is:

su - postgres -c "/usr/pgsql-9.4/bin/pg_ctl -D /mnt/pstore/pg_data/ promote"

The output of the command above is: pg_ctl: cannot promote server; server is not in standby mode

I checked to make sure that the database was in standby mode by running the following command: /usr/pgsql-9.4/bin/pg_controldata /mnt/pstore/pg_data/

And I got the following output: Database cluster state: in archive recovery

Could anybody please provide me with some kind of help since I am not sure where to go from here.

Thank you in advance, Peter


Viewing all articles
Browse latest Browse all 17268

Trending Articles