I have set up a hot standby in PostgreSQL 9.0 on Windows.
I want that, at the time of fail-over, the slave should take over the role of master and start performing operations (both read and write) automatically.
How can I do that?
I have set up a hot standby in PostgreSQL 9.0 on Windows.
I want that, at the time of fail-over, the slave should take over the role of master and start performing operations (both read and write) automatically.
How can I do that?
I would start looking at repmgr from 2ndQuadrant. It is an open source replication management framework for PostgreSQL and takes care of things like failovers.
Otherwise you need to make sure the other node is dead (shoot the other node in the head), then remove the recovery.conf and restart. Note that at this point you will have irrevocably failed over and you cannot fail back until you set up the former master as a slave to the new master and then fail over again.