PostgreSQL: point-in-time recovery (PITR) with WAL
No reviews yet
Advanced
2 h 30 min
1,000 credits
First lab free
Important
Promoting a restored instance is irreversible: once promoted, it opens a new timeline and will no longer accept replaying a single log. That is why the checking step comes first, and why you restore alongside production rather than on top of it.
Tip
Two reflexes to take away. If archive_command fails, PostgreSQL keeps its segments and retries indefinitely: pg_wal grows until the database stops, with nothing raising an alert. Monitor pg_stat_archiver.failed_count. And always note your timestamps with their time zone: recovery_target_time is interpreted in the server's time zone, and a one-hour gap makes you miss the target by an hour.
postgresql
pitr
wal
restore
rpo
PostgreSQL: point-in-time recovery (PITR) with WAL · MonPremierLab