| The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide
by The PostgreSQL Global Development Group Paperback (6"x9"), 274 pages ISBN 9781906966072 RRP £9.95 ($14.95) Sales of this book support the PostgreSQL project! Get a printed copy>>> |
11.4.1 Implementation
The short procedure for configuring a standby server using this alternative method is as follows. For full details of each step, refer to previous sections as noted.
- Set up primary and standby systems as nearly identical as possible, including two identical copies of PostgreSQL at the same release level.
-
Set up continuous archiving from the primary to a WAL archive
directory on the standby server. Ensure that
archive_mode,archive_commandandarchive_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 9781906966072 | The PostgreSQL 9.0 Reference Manual - Volume 3 - Server Administration Guide | See the print edition |