Team accounts with unlimited members now available to everyone! Invite your teammates and ship faster together, even on the Free Plan.

History window

Control how long Neon keeps change history for instant restore, Time Travel, and branching from past states

Instant restore is Neon's point-in-time recovery feature: you can roll a root branch back to an earlier state without copying the whole database. Instant restore (and Time Travel queries, branching from past states, and snapshots) rely on Neon retaining a history of changes. The history window is the Console control—on Settings → Instant restore—that sets how long that change history is kept, which defines how far back instant restore and the other features can reach.

Defaults and plan limits

PlanDefaultMaximum
Free6 hours6 hours (capped at 1 GB of history)
Launch1 day7 days
Scale1 day30 days

A longer history window means:

  • Instant restore can reach further back in time
  • Time Travel queries can reach further back
  • You can create branches from older historical states
  • More WAL records are stored, increasing History usage (the change history metered for instant restore on your bill)

How it works

Neon stores a continuous record of all changes to your data in the form of Write-Ahead Log (WAL) records. The history window setting determines the retention period for this history, which instant restore and related features use.

WAL records that fall outside the configured history window are automatically removed and stop contributing to your project's storage costs.

Storage and billing

The history window directly affects History on your usage dashboard (billed as instant restore storage on invoices). Neon retains WAL records for that duration. The more history you retain, the more storage you use, and the higher those charges.

PlanCost
FreeNo charge (capped at 1 GB)
Launch$0.20/GB-month
Scale$0.20/GB-month

This is separate from your regular storage charges for branch data. You're billed for:

  • Storage: Your actual data size (root branches) or the minimum of accumulated changes or logical data size (child branches)
  • History: The WAL history retained within your history window for instant restore

Understand the trade-offs: Shortening the history window decreases History usage and cost but limits how far back instant restore (and Time Travel) can go. Set the window to match your recovery needs.

See Cost optimization.

Configure the history window for instant restore

Changing the history window affects all branches in your project.

  1. Select your project.

  2. Go to Settings > Instant restore.

    History window configuration

  3. Under History window, use the slider to choose how long to keep change history (used for instant restore, Time Travel, and branching from past states). You can open history storage from the description on that page for details.

  4. Click Save.

note

Reducing the history window to zero minimizes History usage and cost but disables instant restore and Time Travel queries.

Production recommendations

For production workloads, consider extending the history window to 7 days so instant restore can reach further back. This provides:

  • Protection against data loss from human or application errors that may go unnoticed for several days
  • Compliance with retention requirements that may apply to your industry

See Getting ready for production.

The history window setting bounds how far back these capabilities can go:

note

Instant restore and the history window apply to branch data (point-in-time recovery). That is different from the deletion recovery period, which allows you to recover (undelete) an entire deleted project. For information about recovering deleted projects, see Project recovery.

Need help?

Join our Discord Server to ask questions or see what others are doing with Neon. For paid plan support options, see Support.

Was this page helpful?
Edit on GitHub