Setting up WAL shipping
The exact way you set up replication using WAL shipping varies based on PostgreSQL version, and a fair amount of additional scripting is required. There are several software packages available that fill in the gaps by providing the components required, including a working archive_command
implementation, base backup, and node management.
- 2warm: http://projects.2ndquadrant.com/
- walmgr: Part of SkyTools, http://pgfoundry.org/projects/skytools/
- PITRtools: https://projects.commandprompt.com/public/pitrtools
- OmniPITR: https://labs.omniti.com/trac/pgtreats/wiki
As a primary author of the first of these, I'm not an unbiased commentator on which of these is the best solution to this problem. Getting all of the details right here takes more work than is obvious on the surface, and using one of these packages should be preferred to trying to write something from scratch.
The main tunable parameter to note with basic WAL shipping is archive_timeout
. This determines...