|PostgreSQL Reference Manual - Volume 3 - Server Administration Guide|
by The PostgreSQL Global Development Group
Paperback (6"x9"), 204 pages
RRP £13.95 ($24.95)
Sales of this book support the PostgreSQL project! Get a printed copy>>>
The short procedure for configuring a standby server is as follows. For full details of each step, refer to previous sections as noted.
- Set up primary and standby systems as near identically as possible, including two identical copies of PostgreSQL at the same release level.
Set up continuous archiving from the primary to a WAL archive located
in a directory on the standby server. Ensure that
archive_timeoutare set appropriately on the primary (see section 10.3.1 Setting up WAL archiving).
- Make a base backup of the primary server (see section 10.3.2 Making a Base Backup), and load this data onto the standby.
Begin recovery on the standby server from the local WAL
archive, using a ‘recovery.conf’ that specifies a
restore_commandthat waits as described previously (see section 10.3.3 Recovering using a Continuous Archive Backup).
Recovery treats the WAL archive as read-only, so once a WAL file has been copied to the standby system it can be copied to tape at the same time as it is being read by the standby database server. Thus, running a standby server for high availability can be performed at the same time as files are stored for longer term disaster recovery purposes.
For testing purposes, it is possible to run both primary and standby servers on the same system. This does not provide any worthwhile improvement in server robustness, nor would it be described as HA.
|ISBN 0954612043||PostgreSQL Reference Manual - Volume 3 - Server Administration Guide||See the print edition|