Heroku Postgres and Heroku Private Spaces
Last updated 02 August 2016
Heroku Postgres in Private Spaces is only available in Heroku Enterprise.
This article explains the differences between Heroku Postgres provisioning, plans, and connections when used in Private Spaces as compared with using Postgres in the Common Runtime. If you would like to learn how to migrate an existing database into a Private Space, see the Migrating Heroku Postgres Databases to Private Spaces article.
Heroku Private Spaces are dedicated environments for running applications within an isolated network. This means that every part of the application stack, including the dyno, data stores, and third party add-ons are contained within this environment.
Heroku Postgres can run within a Private Space, with a similar developer experience as on the Common Runtime. Many of the same CLI commands and web interfaces will work for private Heroku Postgres databases. Private Heroku Data add-ons are not accessible to applications at build-time. We advise you to eliminate the dependency on your private data store, use a public Heroku Data plan, or contact support for guidance.
Heroku Postgres has a series of plans that are only meant for Private Spaces. The private tier plans are the only plans that can be provisioned inside the isolated network environment. If an attempt is made to create a database from the hobby, standard, or premium tiers, that database request will fail.
Create a new database
Many buildpacks will create a database as part of the build process. If the application that’s being created is within a Private Space, unless a database already exists for that application, the lowest available private plan will be used when creating the database. For a list of the currently available plans, see the plans section.
Private Heroku Postgres databases can be provisioned via the CLI:
$ heroku addons:create heroku-postgresql:private-4 -a private-sushi
Only plans in the private tier of Heroku Postgres can be created inside a Private Space.
Depending on the region and the type of database being created, the provisioning process can take up to 10 minutes before the database is available for use.
Heroku Postgres offers a set of plans for Private Spaces. The private tier is designed for production applications that can tolerate up to 15 minutes of downtime in any given month. All private tier databases include:
- No row limits
- Increasing amounts of in-memory cache
- Fork and follow support
- Database metrics published to application log stream
- High availability
|Plan Name||Provisioning Name||Cache Size||Storage Limit||Connection Limit||Monthly Price|
||1 GB||64 GB||120||$300|
||3.5 GB||256 GB||400||$600|
||15 GB||512 GB||500||$1500|
||30 GB||1 TB||500||$2800|
||60 GB||1 TB||500||$4200|
||120 GB||1 TB||500||$7200|
Unlike the Heroku Postgres databases in our hobby, standard, and premium tiers, private databases cannot be accessed via a local computer. For access to the private databases, you must use the available Heroku Postgres CLI commands. This ensures that you have the correct authorization to connect to the database across the isolated network boundary.
Using the CLI
The ability to connect to private databases is integrated directly in to the Heroku CLI and all of the commands available for the other types of databases are available for private databases.
For more information on the available CLI commands for Heroku Postgres, see the main Heroku Postgres article.
Connecting to the database
All connections to a private database must be made with SSL. See the connection documentation for your language in the main Heroku Postgres article.