---
title: "Optimizing Data Reliability: Heroku Connect & Drift Detection"
description: "Heroku Connect syncs Salesforce data into Postgres by polling time windows, and long-running Salesforce transactions that commit after the window has moved can be missed, causing drift."
url: "https://swe.quest/articles/optimizing-data-reliability-heroku-connect-drift-detection-210645ff0f1dc0fb"
canonical: "https://www.heroku.com/blog/optimizing-data-reliability-heroku-connect-drift-detection/"
source: "Heroku Engineering"
published: "2024-06-26"
difficulty: "easy"
kind: "Announcement"
reading_minutes: 4
tags: ["data-pipelines","consistency","postgres"]
---

# Optimizing Data Reliability: Heroku Connect & Drift Detection

A post on [Heroku Engineering](https://swe.quest/sources/heroku.md), published 2024-06-26, 4 min read, Announcement. Original: [https://www.heroku.com/blog/optimizing-data-reliability-heroku-connect-drift-detection/](https://www.heroku.com/blog/optimizing-data-reliability-heroku-connect-drift-detection/)

## Summary

Heroku Connect syncs Salesforce data into Postgres by polling time windows, and long-running Salesforce transactions that commit after the window has moved can be missed, causing drift. A secondary poll re-runs the same poll bounds later to catch those changes. For Bulk API polls it now creates one bulk job per primary job, with a batch per primary batch, instead of many jobs. It also caps how many secondary tasks run at once, which reduces load on the Salesforce org and leaves more Postgres connections free for customer applications.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Consistency models](https://swe.quest/tags/consistency.md) (Distributed systems)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)

## Prerequisites

- Salesforce APIs ([easy posts on API design](https://swe.quest/tags/api-design.md?difficulty=easy))
- Postgres connections ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

Heroku Connect, Salesforce, Heroku Postgres, Salesforce Bulk API, PensionBee

## Related posts

- [A 15-Second Health Check for Your Heroku Connect Data Pipeline](https://swe.quest/articles/a-15-second-health-check-for-your-heroku-connect-data-pipeline-ed2bcac9c7da237d.md): Heroku Engineering · 2026-06-24 · Medium · 4 min read · Data pipelines, PostgreSQL, Debugging, Developer tools
  The \`heroku connect:diagnose\` command in the Heroku Connect CLI plugin audits a Salesforce-to-Heroku Postgres sync and reports GREEN/YELLOW/RED status for connection-level checks (API version, permissions, database plan) and mapping/field checks (unique identifiers, binary and calculated fields, schema drift).
- [Building an Enterprise Data Warehouse on Heroku: From Complex ETL to Seamless Salesforce Integration](https://swe.quest/articles/building-an-enterprise-data-warehouse-on-heroku-from-complex-etl-to-seamless-8243dc0ab6d91c36.md): Heroku Engineering · 2025-11-05 · Easy · 7 min read · Data pipelines, Analytics & OLAP, PostgreSQL, Replication
  Heroku unified Salesforce and 20+ internal app databases into a warehouse processing over 10 TB monthly, using Heroku Connect to replicate Salesforce data without API limits and Postgres follower databases to read app data without loading production.
- [Keep the monolith, but split the workloads](https://swe.quest/articles/keep-the-monolith-but-split-the-workloads-a46b5ee6a5f1e352.md): incident.io · 2023-04-12 · Medium · 9 min read · Resilience, System design, PostgreSQL, Go, Microservices
  A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services.
- [Scaling SaaS security: Reco’s migration from Postgres to ClickHouse Cloud](https://swe.quest/articles/scaling-saas-security-reco-s-migration-from-postgres-to-clickhouse-cloud-644c039f853be147.md): ClickHouse · 2025-11-17 · Medium · 6 min read · Analytics & OLAP, PostgreSQL, Stream processing, Performance engineering, Cost optimization
  Reco, a SaaS security platform ingesting 10-12 billion JSON events weekly, moved over 90% of its workload from Postgres to ClickHouse Cloud.
- [Evolving the Backend Storage for Platform Metrics](https://swe.quest/articles/evolving-the-backend-storage-for-platform-metrics-0fb82a7939c98396.md): Heroku Engineering · 2024-05-09 · Medium · 6 min read · Databases, Distributed databases, Observability, Cloud platforms, Schema migrations
  Heroku migrated the time-series store behind MetaaS, its internal metrics service, from self-managed Apache Cassandra to AWS DynamoDB without user-visible impact.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
