As DBAs, it is likely that we will eventually preside over a server replacement. Whether this is to avoid failed hardware or due to system upgrades, our job is to move PostgreSQL from one system to the next.
Performing a server migration while simultaneously maintaining maximum availability is not simple. One of the easiest methods is limited to users of shared storage such as a SAN. Such storage can be reassigned to another server quite easily. Without a SAN or other means of shared storage, we need to utilize another method.
Luckily, PostgreSQL added streaming database replication in version 9.1. This recipe will explore how we can make a copy of the new server and then switch to it when we're ready.