Switching live stack systems
At this point, we have our data located simultaneously on two servers. The second system can fulfill many possible roles. It can replace the current node in case of hardware failure, or allow us to perform server maintenance or upgrades with very little downtime.
Regardless of our intent, properly utilizing the second system is the key to a highly available database server. In this recipe, we'll discuss the proper method for activating the second server in a two-node pair so that we can make changes to one or both nodes.
Getting ready
By now, we need the full stack and probably a fully active database server as well. Follow all the recipes up to Tweaking XFS performance before starting here.
How to do it...
For this recipe, we will need two PostgreSQL servers, pg1
and pg2
, where pg1
is the currently active node. Follow these steps as the root
user on the system indicated to move an active PostgreSQL service from one node to another:
- Stop the PostgreSQL service...