Skip to content

When Unlogged Tables Are Safe

unlogged_tables = true is a performance choice, not a default safety choice.

  • repeatable dev or staging loads
  • disposable targets that can be rebuilt from scratch
  • rehearsals where speed matters more than crash durability
  • one-off experiments where the migration can simply be rerun
  • production rehearsals where you need durable target state
  • migrations that rely on resume = true
  • runs where the target cannot be dropped and rebuilt cheaply

If a PostgreSQL crash during the migration would force you to restart from zero and that would be unacceptable, keep unlogged_tables = false.

GoalSetting
fastest disposable loadunlogged_tables = true
durable long-running migrationunlogged_tables = false
resumable migrationunlogged_tables = false and resume = true