WAL and point-in-time recovery
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
explain how WAL enables recovery to any moment.
Planned topics
- WAL (write-ahead log): every change is written to the log before the data files; used for crash recovery and replication.
- WAL archiving copies finished WAL segments to safe storage (
archive_mode,archive_command). - PITR: restore a base backup, then replay archived WAL up to a target time (
recovery_target_time). - Recovery time depends on the base backup age and the WAL volume since.
- Settings and signal files changed over versions (
recovery.signalsince PostgreSQL 12); verify version before recording.
Draft outline details
Demonstration
a timeline: base backup at 02:00, WAL archived continuously, bad DELETE at 14:05, recover to 14:00.
Check your understanding
What two things do you need for PITR?
Show answer
A base backup and the archived WAL after it.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.