Learn Labs
WAL, Vacuum & Recovery

Self-test

Check your understanding

Self-test8 questions

—/8
  1. Why can Postgres return from COMMIT before the data files are written, and still survive a crash?

  2. What does archive_timeout bound, and why was it set to 60 s here?

  3. The 1,000 rows written after the last backup came back in the restore. Where were they?

  4. Why did the incremental backup store 75 MB when only 5% of the rows changed?

  5. Why must a restored copy run with archive_mode=off?

  6. Why did the lab call pg_switch_wal() and wait for a specific segment before restoring?

  7. What does the new timeline after a point-in-time restore protect against?

  8. Design question

    Write a backup policy for a 2 TB database with an RPO of 1 minute and an RTO of 1 hour: what you back up, how often, where, and how you prove it works.