All posts tagged with postgres


Event-driven Data Sync

engineering

Heroku Connect is a service offered by Heroku which performs 2-way data synchronization between Salesforce and a Heroku Postgres database.

When we first built Heroku Connect, we decided to use polling to determine when data had changed on either side. Polling isn't pretty, but its simple and reliable, and those are "top line" features for Heroku Connect. But polling incurs two significant costs: high latency and wasted resources. The more you poll the more you waste API calls and database queries checking when there are no data changes. But if you lengthen your polling interval then you grow the latency for the data synchronization.

Faster Database forking

news

Did you know that Heroku databases can be forked? Forking a database creates a byte-for-byte copy that can be used for testing and development. It is a useful tool that allows teams to be agile with their data.

Today, forking databases is becoming faster. Fast forking reduces the time to create a fork by hours for high transaction database. To quickly fork a database, simply add the --fast flag:

$ heroku addons:add heroku-postgresql:crane --fork BLUE --fast 

Fast forks behave differently from regular forks. They take less time to create, but the data will be somewhat out-of-date (as much as 30 hours). If your data has not changed significantly and you have not performed any schema...

Heroku Postgres Followers Patched

news , VP, Software Engineering

On November 18th, a replication bug was found in Postgres that affected the most recent versions of every Postgres release. The corruption that this bug may introduce could go undetected, and it manifests itself as a follower potentially having an inconsistent view of the data. For example, data could be present in the primary and not on the follower, or data deleted or updated on the primary and not from the follower. The likelihood of triggering this bug is higher for write-heavy workloads, such as many OLTP applications seen at Heroku.

We always recommend placing applications in maintenance mode and scaling down workers when performing a follower based changeover, and following this...

Connection Limit Guidance

news

Many of our customers have recently asked about our connection limit settings on our new Heroku Postgres tiers. Previously we allowed for 500 connections across all production databases, however now there is some variance in the number of connections allowed with only the larger plans offering 500. In individual conversations with customers we’ve detailed the reasoning behind this, and feel its worth sharing this more broadly here now.

For some initial background, our connection limit updates are actually aimed to be an improvement for anyone running a Heroku Postgres database, by both providing some guidelines as well as setting some expectations around what a database instance is...

Welcome to the Community

news

At Heroku we have long considered PostgreSQL to be a powerful and reliable open-source database for keeping data safe and accessible for serious applications with demanding workflows and use cases.

Over the years we’ve invested heavily in continuing to improve it, whether it’s by employing Postgres major contibutors, employing driver maintainers, funding core development, or being part of language communites such as Ruby and Python to help spread the good news that is Postgres. It’s that interaction with the developer and database communities that help us inform and influence the future of Postgres.

This work over the years has continued to advance Postgres to be a better database for...

Browse the blog archives or subscribe to the full-text feed.