Terminology
There are several terms you need to know in order to follow any discussion of warm or Hot Standby setups:
- Write-ahead log (WAL): PostgreSQL writes information to a series of write-ahead log files, in segments of 16 MB in size, before making corresponding changes to the database itself. If you start with an identical pair of databases, and apply the same WAL files to them, the resulting pair will also be identical—since the WAL contains all changed data.
- Base backup: A backup made of the database in a way that includes everything needed for the copy to go through crash recovery and be intact, even if files were changed during the time the backup was being made. This requires using the
pg_start_backup
andpg_stop_backup
commands, as well as making backup copies of both the entire database and the WAL files archived during the period between when those commands were executed. - Point-in-time recovery (PITR): If you have a base database and a series of WAL files, you can...