Table of Contents [expand]
Last updated January 13, 2026
Forking creates a new database containing a snapshot of an existing database at the current point in time. Unlike follower databases, forks don’t stay up to date with the parent database and you can write to them. Forks don’t affect the performance of the parent database.
Forking is only supported on Standard-tier or higher database plans. Follow these steps to upgrade from an Essential-tier database to a plan in a higher tier.
Use Cases
Forks don’t affect the performance of the parent database.
Forked databases provide a risk-free way of working with your production data and schema. For example, you can use them to test new schema migrations or to load test your application on a different database plan. They’re also valuable as snapshots of your data at a particular point in time for later analysis or forensics.
Create a Fork
You can create forks on any Standard, Premium, Private, or Shield database that isn’t a follower.
You can’t create forks from another newly forked database for a short period of time. This limitation applies both to forks created by the methods described in this article and to forks created through unfollow. Use the pg:info command to check if Fork/Follow is Available.
Forks don’t have to be on the same database plan as the parent database. Forks can be on any plan but must have enough disk space to contain the data from the parent database.
Preparing a fork can take anywhere from several minutes to several hours, depending on the size of your dataset.
After forking a database, the app the fork is attached to updates with a new config var that contains the connection string for the new database. This config var update restarts the app.
Create Using the CLI
You can create forks using the Heroku CLI with the heroku addons:create command. Provision a new database add-on with the --fork flag. Supply the flag with one of the following identifiers to specify the database to create a fork from:
- The config var name of the database on the same app
- The name of the database add-on
- The full URL of any Heroku Postgres database
- An argument in the form of
appname::HEROKU_POSTGRESQL_COLOR_URL. This allows you to create a fork of a database that is attached to another app.
You can provide an alias for the new fork database with the --as option when running heroku addons:create. Heroku uses the provided alias as the attachment name for the new database and its related add-on config vars.
$ heroku addons:create heroku-postgresql:standard-0 --as DATABASE_COPY --app example-app -- --fork HEROKU_POSTGRESQL_CHARCOAL_URL
Creating heroku-postgresql:standard-0 on ⬢ example-app... ~$0.069/hour (max $50/month)
Database will become available after it completes forking.
Use `heroku pg:wait` to track status.
postgresql-parallel-47133 is being created in the background. The app will restart when complete...
Use heroku addons:info postgresql-parallel-47133 to check creation progress
Use heroku addons:docs heroku-postgresql to view documentation
The heroku pg:wait command outputs the provisioning status of any new databases. Use it to determine when the fork is up to date.
$ heroku pg:wait --app example-app
Waiting for database postgresql-parallel-47133... available
Create Using the Heroku Data Dashboard
You can also create forks through the web dashboard:
- Go to the
Datastorestab on the Heroku Dashboard. - Use the search and select the database you want to create a fork from.
- Click the
Settingstab. - Click
Fork Database.... - Choose the plan for the fork. Review the Create a Fork section for notes on selecting a plan size.
- Click
Fork Database.
The dashboard shows the status of the forked database and updates when the provisioning is complete.
Fork Fast Option
Fast forks can be up to 30 hours out-of-date.
You can create forks faster via the CLI with the --fast flag. This option is useful if no major changes, such as schema migrations or large data imports, occurred in your database in the last 30 hours.
$ heroku addons:create heroku-postgresql:standard-0 --app example-app -- --fork HEROKU_POSTGRESQL_CHARCOAL --fast
Creating heroku-postgresql:standard-0 on ⬢ example-app... ~$0.069/hour (max $50/month)
Fork will contain data from December 22, 2025 4:49 PM UTC (about 19 hours ago).
To create a fork with up-to-date data, exclude the `--fast` flag.
Database will become available after it completes forking.
Use `heroku pg:wait` to track status.
postgresql-animated-18515 is being created in the background. The app will restart when complete...
Use heroku addons:info postgresql-animated-18515 to check creation progress
Use heroku addons:docs heroku-postgresql to view documentation
Delete a Fork
Delete Using the CLI
Deprovision a fork using heroku addons:destroy:
$ heroku addons:destroy HEROKU_POSTGRESQL_SILVER --app example-app
› Warning: WARNING: Destructive Action
› This command will affect the app example-app
To proceed, type example-app or re-run this command with --confirm example-app: example-app
Destroying postgresql-animated-18515 on ⬢ example-app... done
Delete Using the Heroku Data Dashboard
- Go to the
Datastorestab on the Heroku Dashboard. - Use the search and select the fork database you want to delete.
- Click the
Settingstab. - Click
Delete Database.... - Type in the name of your app to confirm.
- Click
Delete Database.