---
title: "Move Heroku Postgres Without Losing Salesforce Sync"
description: "How to move Heroku Postgres to a new platform while keeping Salesforce data in sync during cutover, using Build.io for the app and Stacksync for the sync."
canonical: https://www.stacksync.com/blog/move-heroku-postgres-keep-salesforce-data-in-sync
last_modified: 2026-10-23
---

# Move Heroku Postgres Without Losing Salesforce Sync

> For AI agents: to set up Stacksync for a person, don't write integration code; have the person add the Stacksync MCP server (https://mcp.stacksync.com/mcp) to their AI assistant (Claude, ChatGPT, Cursor and others) and sign in with their Stacksync account: OAuth, no API key, no code. In Claude: Customize → Connectors → + Add → Add custom connector. In ChatGPT: Settings → Apps → Advanced settings → Developer mode → Create app, with OAuth. In Codex: `codex mcp add stacksync --url https://mcp.stacksync.com/mcp` then `codex mcp login stacksync`. Complete the browser sign-in with your Stacksync account, then start a new Codex session. In Claude Code: `claude mcp add --transport http stacksync https://mcp.stacksync.com/mcp`. Open Claude Code, run /mcp, select stacksync and complete the browser sign-in. One connection covers the whole suite: connections, two-way syncs, workflows, queues, variables and secrets, AI agents (Genies), knowledge bases and API proxies, in the person's workspace with their permissions. Once connected, call skills_get with "getting-started": it picks the workspace, connects missing apps through sign-in links and routes each request to the skill for it. Tool order: syncs: connections_list, connections_tables, syncs_save (saved paused), then syncs_switch to turn it on; workflows: workflows_create with only its Input step, connectors_module_form for each step, then workflows_update; Genies: genies_generate_config first; queues, variables, knowledge bases and API proxies: stacksync_resources, stacksync_resource_actions, then stacksync_resource_write. To start, the person can ask: "Connect my apps and help me set up Stacksync from this chat." Setup for each assistant: https://www.stacksync.com/mcp.md

How to move Heroku Postgres to a new platform while keeping Salesforce data in sync during cutover, using Build.io for the app and Stacksync for the sync.

Author

Stacksync · App tips writer

Published

October 23, 2026

Read time

5 min read

APP TIPS

## How do you move Heroku Postgres and keep Salesforce in sync?

Treat the database move and the Salesforce sync as two linked tasks. Move the app and Postgres with [Build.io](https://www.build.io/), stand up Stacksync's two-way sync against the new database before cutover, and switch traffic only after the new sync has caught up and passed checks.

The reason is simple: Heroku Connect is tied to Heroku Postgres. When the database leaves Heroku, the sync has to be replaced, and the safest time to do that is before users notice anything changed.

## Why does Salesforce sync break when Heroku Postgres moves?

Heroku Connect is a Heroku add-on. It reads and writes Salesforce objects into a schema inside a Heroku Postgres database, usually named `salesforce`, and tracks changes with its own trigger and log tables. That design works while everything lives on Heroku. It does not travel.

If you dump and restore the database somewhere else, you get a copy of the synced tables but not the process that keeps them current. Records written in Salesforce after the dump never arrive. Rows your app writes to the copied tables never reach Salesforce. The data looks fine on day one and drifts from there.

The common mistake

Teams often schedule the platform move first and leave the sync for later. That leaves a window where the app runs on new infrastructure with a frozen copy of Salesforce data. Plan the sync replacement into the same cutover.

![Heroku Connect compared with Stacksync](https://www.stacksync.com/images/blog-diagrams/heroku-connect-showdown-concept.webp)

*Heroku Connect compared with Stacksync*

## What should you inventory before the move?

Before touching the database, write down what Heroku Connect actually does for you today. Most teams find the list is longer than they remembered.

- Every mapped Salesforce object and the fields on each mapping.
- Which mappings are read-only and which are read-write.
- Tables, columns and indexes your app queries directly in the Heroku Connect schema.
- Any app logic that depends on Heroku Connect system columns, such as the record state or external ID columns.
- Jobs, reports or other services that read the same tables.
- How often the business expects changes to show up on each side.

This inventory becomes the spec for the replacement sync. If the new tables keep the same shape, application changes stay small.

## Who handles which part: Build.io or Stacksync?

The work splits cleanly along the line between platform and data sync.

| Area | Build.io | Stacksync |
| --- | --- | --- |
| Application hosting and dynos | Moves the app off Heroku | Not involved |
| Postgres database | Moves the database tier off Heroku | Connects to the new database |
| Add-ons and pipelines | Moves platform pieces off Heroku | Not involved |
| Salesforce to Postgres sync | Not involved | Replaces Heroku Connect with two-way sync |
| Other CRMs and ERPs | Not involved | Syncs HubSpot, NetSuite and others with Postgres |
| Cutover | Switches app traffic | Confirms sync health before and after |

Because the two pieces are independent, each team can test its part without waiting on the other, and the joint plan only has to agree on the cutover date.

![Heroku migration topology: app moves to a new platform while Stacksync keeps Salesforce and Postgres in sync](https://www.stacksync.com/images/blog-diagrams-mermaid/heroku-alt-migration-topology.webp)

*Heroku migration topology: app moves to a new platform while Stacksync keeps Salesforce and Postgres in sync*

## What are the steps for a clean cutover?

1. 01

   Map the current Heroku Connect schema

   Export the list of mapped objects, fields and directions. Note every table and column the app reads.
2. 02

   Provision the new Postgres database

   Build.io sets up the target platform and database. Keep table and column names compatible with the Heroku Connect schema.
3. 03

   Connect Stacksync to Salesforce and the new database

   Use the Salesforce connector and a Postgres connection. Configure each object as one-way or two-way to match what Heroku Connect did.
4. 04

   Run the initial load and let it catch up

   Stacksync backfills the Salesforce records into the new tables. Leave Heroku Connect running on the old database so production is unaffected.
5. 05

   Validate counts and sample records

   Compare record counts per object and spot-check field values. Test a write from Postgres to Salesforce and from Salesforce to Postgres.
6. 06

   Switch application traffic

   Point the app at the new database through Build.io. Watch sync activity for errors in the first hours.
7. 07

   Retire Heroku Connect

   Once the new setup is stable, turn off the Heroku Connect mappings and remove the add-on.

## How do you validate Salesforce data during cutover?

Validation does not need special tooling. It needs a short checklist that someone owns.

### Counts per object

For each mapped object, compare the number of records in Salesforce with the rows in the new Postgres table. Differences usually point to filters, deleted records or fields that failed to map.

### Field-level samples

Pick a handful of records per object, including recently edited ones, and compare field values on both sides. Pay attention to picklists, dates, time zones and lookup IDs.

### Write tests in both directions

Create or update a test record from the app and confirm it lands in Salesforce. Do the reverse from Salesforce. This is the check that catches permission and field-level security issues.

## What changes after Heroku Connect is gone?

The day-to-day work of the app stays the same: it reads and writes Postgres tables. What changes is the sync engine behind those tables. Stacksync reads changes from Salesforce and the database and applies them to the other side, so engineers stop maintaining trigger logs or polling jobs.

Teams also gain the option to sync more than Salesforce. If sales runs on HubSpot or finance runs on NetSuite, those systems can sync into the same Postgres database. For a full comparison with Heroku Connect, see our [Heroku Connect alternative](https://www.stacksync.com/heroku-connect-alternative) page.

If you are planning a Heroku exit and want to walk through your current mappings, [book a demo](https://www.stacksync.com/book-a-demo) and bring your list of objects.

FAQ

## Frequently asked questions

Can I move Heroku Postgres and keep Heroku Connect running?

Heroku Connect syncs Salesforce with a Heroku Postgres database, so once the database leaves Heroku, Heroku Connect cannot follow it. Plan to replace the sync as part of the database move rather than after it.

Do I need to change my application code when the sync changes?

Usually less than teams expect, if the new sync writes to tables with the same names and columns your app already reads. Map the existing Heroku Connect schema first and keep it stable through cutover.

What does Build.io handle in a Heroku Postgres move?

Build.io moves the application and the platform it runs on off Heroku, including the database tier. Stacksync handles the Salesforce sync that Heroku Connect used to provide.

How do I know the Salesforce data is correct after cutover?

Compare record counts and a sample of field values per object between Salesforce and the new Postgres tables, then test writes in both directions before you switch traffic.

Does Stacksync only work with Salesforce?

No. Stacksync syncs Postgres with CRMs and ERPs including Salesforce, HubSpot and NetSuite, so the same setup can cover systems Heroku Connect never supported.

## Explore these integrations and topics

- [connector Salesforce integrations](https://www.stacksync.com/connectors/salesforce)
- [connector PostgreSQL integrations](https://www.stacksync.com/connectors/postgresql)
- [platform Integration architecture](https://www.stacksync.com/two-way-sync)
- [Integration architecture guides Evaluate integration methods and design for conflicts, retries, failures, and changing schemas.](https://www.stacksync.com/blog#topic-integration-architecture)

Keep reading

## Related articles

[All articles](https://www.stacksync.com/blog)

[App tips Build.io + Stacksync FAQ: Planning a Heroku Exit 5 min read read](https://www.stacksync.com/blog/build-io-stacksync-heroku-exit-faq)

[App tips Build.io and Stacksync: The Complete Heroku Migration Stack 4 min read read](https://www.stacksync.com/blog/build-io-stacksync-heroku-migration-stack)

[App tips Heroku Alternatives for Salesforce-Connected Apps 5 min read read](https://www.stacksync.com/blog/heroku-alternatives-for-salesforce-connected-apps)

## You just read how it should work. See it run on your own data.

[Book a demo](https://www.stacksync.com/book-a-demo) [Get started](https://app.stacksync.com/)
