Point-in-time Recovery

When you make a change to a PostgreSQL database, the PostgreSQL server records your changes in the shared-buffer pool, the write-ahead log (WAL), and eventually, in the file that holds the table that you've changed. The WAL stores a complete record of every change that you make. PostgreSQL's point-in-time recovery mechanism (PITR) uses the modification history stored in the WAL files to roll-forward changes made since the most recent cluster backup. You can think of PITR as an incremental backup scheme. You start with a complete backup and then, periodically, archive the changes. To recover from a crash, you restore the complete backup and then apply the changes, in sequence, until you've recovered all of the data that ...

Get PostgreSQL, Second Edition 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.