Securing the WAL stream
The primary mechanism that PostgreSQL uses to provide a data durability guarantee is through its Write Ahead Log (WAL). All transactional data is written to this location before ever being committed to database files. Once WAL files are no longer necessary for crash recovery, PostgreSQL will either delete or archive them. For the purposes of a highly available server, we recommend that you keep these important files as long as possible. There are several reasons for this; they are as follows:
- Archived WAL files can be used for Point In Time Recovery (PITR)
- If you are using streaming replication, interrupted streams can be re-established by applying WAL files until the replica has caught up
- WAL files can be reused to service ...
Get PostgreSQL 9 High Availability Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.