CertGrid CertGrid
Configuration·PostgreSQL

PostgreSQL WAL Archiving and Recovery Readiness

A base backup restores last night. WAL archiving is what covers everything since - and pg_stat_archiver is the one view that tells you whether it is actually working before you need it to be.

Backup and Restore Guide 25 of 47 Advanced

wal_level = replica is the default and is sufficient for archiving and streaming replication. logical is only needed for logical decoding.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

This guide includes

Use this when a base backup only gets you to last night. This matters because WAL archiving is what fills the gap since - and whether the archiver is keeping up is something to monitor rather than assume.

Before you start

  1. Read the settings archiving depends on

  2. Turn archiving on

  3. Generate WAL and watch it arrive

  4. Confirm the archiver is actually keeping up

Official sources