Skip Navigation
Show nav
Heroku Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
View categories

Categories

  • Heroku Architecture
    • Dynos (app containers)
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Command Line
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery
    • Continuous Integration
  • Language Support
    • Node.js
    • Ruby
      • Working with Bundler
      • Rails Support
    • Python
      • Background Jobs in Python
      • Working with Django
    • Java
      • Working with Maven
      • Java Database Operations
      • Working with Spring Boot
      • Java Advanced Topics
    • PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
    • Heroku Data For Redis
    • Apache Kafka on Heroku
    • Other Data Stores
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
    • Compliance
  • Heroku Enterprise
    • Private Spaces
      • Infrastructure Networking
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Single Sign-on (SSO)
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Crunchy Bridge
Crunchy Bridge

This add-on is operated by Crunchy Data Inc.

Crunchy Bridge is a fully managed Postgres service from the Postgres Experts.

Crunchy Bridge

Last updated December 22, 2021

Table of Contents

  • Provisioning the Add-on
  • Local Setup
  • Language-Specific Integrations
  • Migrating Between Plans
  • Removing the Add-on
  • Support

Crunchy Bridge is an add-on for fully managed Postgres provided by Crunchy Data.

Crunchy Bridge provides fully managed Postgres that you can easily connect to your Heroku app. Crunchy Bridge includes:

  • Simple provisioning
  • Backups
  • Disaster recovery and point in time recovery
  • Simple scaling
  • Built-in connection pooling

These features are provided by an expert team of Postgres contributors.

You can connect your app to Crunchy Bridge with any of your standard language drivers in:

  • Ruby
  • Python
  • Node.js
  • Go
  • Java
  • PHP

Provisioning the Add-on

Attach crunchy-postgres to a Heroku application via the CLI:

Reference the Crunchy Postgres for a list of available plans.

$ heroku addons:create crunchy-postgres
Creating CRUNCHY on freely-falling-7394... free
Your add-on has been provisioned successfully

After provisioning crunchy-postgres, the CRUNCHY_DATABASE_URL config var is available in the attached app’s configuration. It contains the full connection string to your newly provisioned Postgres database. You can see the config var via the heroku config:get command:

$ heroku config:get CRUNCHY_DATABASE_URL
postgres://postgres:sDcaz24izdKgsLv328cKabclqb2v7lcdT3zCQd47hhKTWlehu13ICKmhRMJwP2XN@p.ldzx3sqmwdzsbimyfmlrdpoxpq.db.postgresbridge.com:5432/postgres

After installing CRUNCHY-POSTGRES, the application can be integrated with the add-on.

Local Setup

Service Setup

You can install Postgres for use in a local development environment. Typically, this process entails installing Postgres on your local machine and pointing the app to your local DB.

On… Install with…
macOS Postgres.app
Windows Windows installer
Ubuntu Linux sudo apt-get install postgresql

Language-Specific Integrations

Ruby on Rails

To use PostgreSQL as your database in Ruby applications, include the pg gem in your Gemfile.

gem 'pg'

Run bundle install to download and resolve all dependencies.

If you’re using the pg gem to connect to your Postgres database from a Heroku dyno, and haven’t specified an sslmode in your configuration or code, the gem defaults to sslmode: prefer. In this mode, your connections work if SSL use is enforced on your Postgres database.

Python/Django

Install the dj-database-url package using pip.

pip install dj-database-url

Then add the following to the bottom of settings.py:

import dj_database_url
DATABASES['default'] = dj_database_url.config(conn_max_age=600, ssl_require=True)

This parses and converts the values of the DATABASE_URL environment variable to something Django can understand.

Migrating Between Plans

Use the heroku addons:upgrade command to migrate to a new plan.

$ heroku addons:upgrade CRUNCHY-POSTGRES:hobby-4
-----> Upgrading CRUNCHY-POSTGRES:hobby-4 to sharp-mountain-4005... done, v18 ($100/mo)
       Your plan has been updated to: CRUNCHY-POSTGRES:hobby-4

Removing the Add-on

Before removing CRUNCHY-POSTGRES, export its data by running pg_dump against your database.

To remove CRUNCHY-POSTGRES, use the CLI:

This action destroys all associated data and you can’t undo it!

$ heroku addons:destroy CRUNCHY-POSTGRES
-----> Removing CRUNCHY-POSTGRES from sharp-mountain-4005... done, v20 (free)

Support

Submit all CRUNCHY-POSTGRES support and runtime issues via one of the Heroku Support channels. Any non-support-related issues or product feedback is welcome at info@crunchydata.com.

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Ziggeo DataDNA

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Podcasts
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing

Subscribe to our monthly newsletter

Your email address:

  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Heroku Podcasts
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Facebook
  • Instagram
  • Github
  • LinkedIn
  • YouTube
Heroku is acompany

 © Salesforce.com

  • heroku.com
  • Terms of Service
  • Privacy
  • Cookies
  • Cookie Preferences