Does restoring a Heroku Postgres backup to a different plan preserve all extensions and configuration settings?
0 reputation · 09 Jul 2020, 03:21 UTC
Background
Heroku Postgres allows restoring backups to a new database instance, which can be on a different plan or in a different region. The documentation confirms that restoration creates a separate database, leaving the original intact until promotion. However, it does not explicitly state whether all extensions, collation settings, or custom configuration parameters are preserved when the target plan differs from the source.
Constraints and Uncertainty
Plan tiers (Hobby, Standard, Premium, Enterprise) support different sets of PostgreSQL extensions. For example, pg_stat_statements or postgis may be available on Standard but not on Hobby. Region changes may also affect available extensions due to compliance or version differences. Heroku's backup restore process uses pg:backups:restore and does not provide a dry-run mode to preview the resulting configuration.
Questions
- When a backup is restored to a database on a different plan, are unsupported extensions silently dropped or does the restore fail?
- Are custom
postgresql.confparameters (e.g.,work_mem,max_connections) reapplied automatically, or must they be reconfigured manually? - Does a cross-region restore preserve the source database's collation and locale settings if the target region defaults differ?