WAL archiving considerations
The following WAL archiving best practices are recommended:
- PostgreSQL write-ahead log (WAL) files are generated based on the activity in the database, and database WAL and archiving parameters. These files, while very useful in case the database requires a recovery, can fill up the filesystem after some time. A common strategy is to back them up to a separate archive directory. This archive directory can be a separate PowerFlex volume that can be protected using periodic snapshots, remote replication, of backup to other media such as by using Dell PowerProtect software.
- During database recovery, the snapshot containing the data files is restored and that is the starting point of the recovery process. PostgreSQL database engine looks for the WAL records associated with that point in time to re-apply them to the data files. If all these WAL records are already present in the WAL directory, then it will find them there and use them. If these WAL records have been archived it will look for them, based on the database parameters, in the archive directory, copy them to the WAL directory, and then use them during the database recovery process.
- For more information about PostgreSQL archiving process, see Continuous Archiving and Point-in-Time Recovery.