PostgreSQL Recovery Controls
Learn how PostgreSQL recovery targets work and how to choose between time-based and LSN-based replay stopping points.
A recovery stop point defined by time, XID, name, or LSN to which PostgreSQL will recover during PITR.
A recovery target determines exactly where WAL replay stops during PITR, allowing recovery to a known-good state.
This is essential when the latest timeline already includes bad writes, accidental deletes, or damaging schema operations.
PostgreSQL supports recovery targets by time, LSN, transaction ID, and named restore points. The right choice depends on incident precision requirements.
Always rehearse target selection in non-production environments. Incorrect settings can replay beyond the safe boundary or stop too early.
Incident runbooks should include target selection logic, validation queries, and application-level correctness checks.