Heroku Connect Maintenance Operations
Last updated June 20, 2025
Table of Contents
This article covers Heroku Connect maintenances. It also covers how to change your Heroku Postgres plan or upgrade its version.
Heroku Connect Maintenances
From time to time, Heroku takes Heroku Connect offline to perform maintenance tasks. Typical tasks include updating the underlying infrastructure. This maintenance is handled automatically by Heroku. Unlike Heroku Postgres, you can’t schedule or reschedule maintenance windows for Heroku Connect.
Maintenances typically take up to 45 minutes. During maintenance, all data synchronization for Heroku Connect is unavailable. Configuring Heroku Connect is also unavailable. Existing data in the Heroku Postgres database remains accessible. Connect retains changes and resumes synchronizing after the maintenance.
Preparing for Heroku Connect Maintenances
Maintenance windows are announced roughly two weeks before they happen on status.heroku.com. You can click Subscribe
on that page to get notifications.
There’s nothing you must do to prepare besides being aware of and preparing for the delay in data sync during the maintenance window. Connect resumes normal sync following the maintenance operation.
Changing the Plan of Your Heroku Postgres Database
If you want to change the plan of your Heroku Postgres Database, you can use the heroku addons:upgrade
command to do so. Heroku Connect is able to handle this operation transparently since it behaves identically to an HA failover.
While not recommended, you could use the Follower Changeover method instead. If you wish to do that then you must take additional steps as those documented in the following section, omitting step 4.
If you’re upgrading from an Essential-tier database to a plan in another tier, you can’t create a follower. Instead, use the pg:copy
process to copy data into the new database. Pause Heroku Connect at the same time as you put your application into maintenance mode, and resume it again when you reactivate your application.
Upgrading the Version of a Heroku Postgres Database
Upgrading with pg:upgrade* Commands
To upgrade the version on a Heroku Postgres database with Heroku Connect, we recommend using the version upgrade commands and following the instructions in the Upgrading with pg:upgrade:* Commands section. This upgrade process involves:
- Running
heroku pg:upgrade:prepare
to prepare the upgrade. - Pausing the Heroku Connect connection before starting the upgrade.
- Running
heroku pg:upgrade:run
to start the upgrade when it’s ready, or waiting for the scheduled maintenance window. - Resuming the Heroku Connect connection after the upgrade completes.
Upgrading with a Follower Database
Alternatively, if you want to upgrade the version with a follower database instead, there are additional required steps so that the database sync operations can continue as expected. To upgrade the database version with a follower database, follow these instructions for how Heroku Connect fits into that process.
These steps ensure that the new database is an exact copy of your current database. Heroku Connect doesn’t create tables or transfer data to an empty database, so be sure to follow the proper upgrade process.
If you’re upgrading the version on an Essential-tier database, use the version upgrade commands or the pg:copy
process to copy data into the new database instead. With the pg:copy
method, pause Heroku Connect at the same time as you put your application into maintenance mode, and resume it again when you reactivate your application.
Create your follower database and allow it to get mostly caught up with your lead database. This minimizes the amount of downtime required for the upgrade.
Pause your connection for the same reason that you put your application into maintenance mode, to prevent Heroku Connect from trying to write to your database during the upgrade.
Wait for your follower to catch up. Now that Heroku Connect and your application have both stopped writing to your database, the follower can get completely caught up. You can check its status using
heroku pg:info
.Upgrade the follower database using
pg:upgrade:run
. This command has the follower unfollow the leader and perform the Postgres version upgrade.You now must promote the follower database to become the new lead database. The steps you take depend on whether your Heroku Connect is using a standard database URL (
DATABASE_URL
) or a custom database URL (for example,HEROKU_POSTGRESQL_ROSE_URL
).- If you’re using a standard database URL, Promote the follower to become the new lead database. This makes it accessible as
DATABASE_URL
. - If you’re using a custom database URL, you must update the Heroku Connect Database Settings with the new custom database URL for the promoted follower or use heroku addons:attach to attach the database to a name of your choosing.
- If you’re using a standard database URL, Promote the follower to become the new lead database. This makes it accessible as
Resume Heroku Connect using the same process used to pause it in step 2, and bring your application out of maintenance mode. Heroku Connect automatically picks up the new
DATABASE_URL
for your application (or custom database URL, if you have that configured) and resumes synchronization using the new database.
Recovering Synchronization After a Database Rollback
Heroku Connect uses a high-water mark methodology. Rolling back a synced database causes inconsistent data. Reload mappings after a database rollback to recover data consistency.
Pausing Synchronization
When performing certain tasks, such as upgrading your database, you want to pause synchronization activity in Heroku Connect. To do this navigate to the Settings
tab, Manage Connection
and click Pause
.
Heroku Connect completes any pending operations before entering the paused state. When your connection is paused then changes to data in the database continue to be added to the trigger log and changes made in Salesforce aren’t polled. Push Topic notifications from Salesforce for mappings using the streaming mode are also ignored.
Connections can only be paused when they are in the IDLE
state. If your connection remains in the POLLING_DB_CHANGES
status for an extended time, check your logs to debug.
To resume synchronization return to the Settings
tab, Manage Connection
and click Resume
. Heroku Connect continues where it left off: entries in the trigger log are processed and pushed to Salesforce and changes made in Salesforce are retrieved using polling (including those mappings that would normally use the Streaming API).
Any changes made to data in the database or in Salesforce while your connection is paused are automatically synchronized when your connection is resumed.
Recreating a Connection
If you’ve reloaded a sandbox organization or you need to upgrade from an Essential-tier database to a plan in another tier, you must delete your existing connection and create a new one.
The following settings are manually configured:
- Collaborators and their notifications settings
- Beta features
- The Write Algorithm
- The Salesforce API version
To automate the rest of the recreation, follow these instructions for the Heroku CLI or the Heroku Connect Dashboard.
CLI
From the Heroku CLI:
Export your Heroku Connect configuration with:
$ heroku connect:export -a appname herokuconnect-resource-name
If you have any read or write mappings, make sure you aren’t writing any new data to those tables. Also, make sure all the mappings are in
DATA_SYNCED
to ensure all your data is present in Salesforce. To stop activity on the connection, run:$ heroku connect:pause -a appname herokuconnect-resource-name
Destroy the Heroku Connect add-on with:
$ heroku addons:destroy -a appname herokuconnect-resource-name
Create a new Heroku Connect add-on with:
$ heroku addons:create herokuconnect
Authenticate your add-on with the following command and login with your Salesforce credentials:
$ heroku connect:sf:auth -a appname herokuconnect-resource-name
Import the mapping configuration you exported from step one with:
$ heroku connect:export mapping_file.json -a appname herokuconnect-resource-name
Dashboard
From the Heroku Connect Dashboard:
Export your Heroku Connect configuration from the
Settings
tab.a. Select
Import/Export Configuration
, thenExport
, andExport
again in the confirmation window to download the JSON file.If you have any read or write mappings, make sure you aren’t writing any new data to those tables. Also, make sure all the mappings are in
DATA_SYNCED
to ensure all your data is present in Salesforce. From theSettings
tab, clickManage Connection
, and thenPause
to stop activity on the connection.Destroy the Heroku Connect add-on from the
Resources
tab on Heroku Dashboard. Select the actions button (three vertically-stacked dots) on the add-on’s to open the menu. Then selectDelete Add-on
.Create a new Heroku Connect add-on from the
Resources
tab on Heroku Dashboard. Search for and add theHeroku Connect
add-on.Authenticate your add-on by opening the Heroku Connect Dashboard and select
Setup Connection
.a. Select the Heroku Postgres database and schema to connect to your add-on, and click
Next
.b. Select the Salesforce org type and API version for your connection and select
Authorize
to log in with your Salesforce credentials.Import the mapping configuration you exported from step one from the
Settings
tab.a. Select
Import/Export Configuration
, thenImport
.b. Select
Choose File
and select the file to upload, and then selectUpload
.
Changing Field Definitions in Salesforce
Field definition changes can delay synchronization with Heroku Connect if not coordinated properly.
Heroku Connect doesn’t automatically change the table schema in PostgreSQL after you’ve changed the corresponding field definition in Salesforce. This is because attempting to change the field can result in data loss or corruption.
After changing a field in Salesforce, users must edit the object mapping in Heroku Connect to trigger an update to the PostgreSQL table schema by Heroku Connect. In simpler cases, all that users must do is click Edit
for the mapping and then click Save
. In more complex cases, users must deselect the field, save the mapping, edit the mapping again, and then re-add the field. This causes Connect to drop the column, re-add it, and load the data back into the column.
Simpler cases include extending or shortening the length of a field. More complex cases include changing the types of fields.