Compose Database-as-a-Service Help and Documentation

Everything you need to know about Compose, Hosted or Enterprise, is here in our help system. Whether you run one database for your businesses' sole application or six different databases to support an entire corporation, we've got the information you need.

PostgreSQL on Compose

Like all Compose databases, PostgreSQL Deployments allow developers to focus on what they do best (developing useful applications) and avoid the guesswork of capacity planning. These deployments are deployed on fast SSDs, fully replicated, and have access to huge amounts of RAM. As an application’s data size increases, the deployment resources scale fluidly to maintain consistent performance, and are billed based on actual usage.

PostgreSQL uses RAM and I/O efficiently. Because of this, we scale RAM at a 1-to-10 ratio with datasize. As your data size increases by 1GB, we include 100MB of RAM.

Features of PostgreSQL Deployments:

  • Uses the latest production PostgreSQL 9.4 and 9.5 release
  • Automatically scaling RAM, CPU, and I/O as your PostgreSQL data grows.
  • Guaranteed resources per deployment.
  • 2 data-nodes clusters replicated using WAL streaming
  • Automatic failover process begins after leader node is down for 60 seconds
  • Running on extremely fast SSD (solid state drives)
  • Access to the standard Contrib add-ons
  • No limit on database creation or schema create - you have CREATEDB and CREATEROLE access
  • No-cost backups, no matter how big your deployment grows.
  • Enabled SSL connections
  • Start with 1GB for $17.50 - as you grow each additional gigabyte of data costs $12.

Getting Started

  1. Create Compose account
  2. Create PostgreSQL deployment
  3. Add user with password
  4. Install tools and then connect to your database using a local psql command or GUI tool, such as PGAdmin
  5. Connect your application using your programming language's driver

Installing tools

  • Ubuntu: Run sudo apt-get install postgresql-client to install the psql command.
  • Mac OS X:
    • You will need to install PostgreSQL, the database, to get the tools. Consult the PostgreSQL Mac OS X page for details of the various install options.
    • There are also stand-alone GUI tools for the Mac such as PSequel.
  • Other platforms: Consult the PostgreSQL download page for details of the various install options.

Data Center Availability

See Compose Datacenter Availability for current location availability.

Backups & Disaster Recovery

PostgreSQL Deployments include the following automatic daily backup pattern:

  • Daily backups for 7 days
  • Weekly backups for 4 weeks
  • Monthly backups for 3 months

Backups include all PostgreSQL data files, and are available for download. Backup downloads include a README file. See this file for instructions on restoring the data.

High Availability

All PostgreSQL Deployments are high-availability clusters with 2 data nodes. Data nodes are powered by fully redundant architecture from the datacenter to the server. PostgreSQL clusters consist of a leader and a follower member on separate machines in separate zones. In the event of a leader member failure, we've configured automatic promotion of the current slave within 60 seconds of the leader becoming unresponsive. Failover will only occur if the follower is within 1 MB of the leader, else the deployment will wait for the leader to come online. Using the Deployment topology on your PostgreSQL deployment to see if your follower is healthy enough to become Primary.

Each PostgreSQL deployment has a proxy, which provides a single member connection string so there's no worrying with which member is currently leader. Failover will happen seamlessly without requiring you to change your application's connection configuration.

More information

Further aspect of PostgreSQL are explored in the following articles:

Still Need Help?

If this article didn't solve things, summon a human and get some help!

PostgreSQL on Compose