How to Create PostgreSQL Database Clusters

PostgreSQL is an open source, object-relational database built with a focus on extensibility, data integrity, and speed. Its concurrency support makes it fully ACID compliant, and it supports dynamic loading and catalog-driven operations to let users customize its data types, functions, and more.

You can create a PostgreSQL database cluster at any time from the Create menu by selecting Databases. This takes you to the Create a Database page.

The Create menu

In the create menu, click Databases to open the database cluster creation page. This is where you choose your database cluster’s configuration, like the number and size of nodes and the datacenter region.

Choose a datacenter

In the Choose a datacenter section, select the datacenter for your database cluster.

The datacenter selection portion of the databases create page

This page lists the datacenters in which you currently have the most resources. The number of resources you have in each datacenter is listed to the right as X resources. Hover over this text to see the specific resources you have in that datacenter.

For the best performance, create your database in the same datacenter as your other DigitalOcean resources. After creation, you can relocate your cluster to another datacenter.

Each region has one or more datacenters, each with a different VPC network. By including resources in the same datacenter, they all gain access to the same private networking interface, which reduces lag and keeps traffic between them from being routed over the public internet.

Choose a database engine

In the Choose a database engine section, choose PostgreSQL.

The database engine selection portion of the databases create page

We currently support major versions 10, 11, and 12, and the latest minor version is selected by default. You cannot change the PostgreSQL version after creating a cluster.

Choose a cluster configuration

In the Choose a cluster configuration section, select the machine type and the number and size of the database nodes. Each option lists its combined monthly cost, equivalent hourly cost, and node specifications. For more options, click Additional product plans.

The Choose a cluster configuration section of the Create a database page displaying the node size, standby nodes, and monthly cost

If you select any node plan besides the smallest (1 vCPU / 1 GB RAM / 10 GB SSD), you can also add up to two standby nodes to your cluster. Standby nodes ensure that your data stays available by giving your cluster high availability and failover.

You can increase the number or size of database nodes at any time. However, because of data integrity risks, you cannot downsize nodes.

Finalize and Create

In the last section, Finalize and Create, choose the name for the cluster, the project to add it to, and any tags you want to use.

The Finalize and Create section of the Create a database page

There are three sub-headers in this section:

  • Choose a name: You can leave the automatically-generated name for the database or choose a custom name. Names must be unique, be between 3 and 63 characters long, and only contain alphanumeric characters, dashes, and periods.

  • Select a project: You can leave the default project or choose another one.

  • Tags: You can add a tag by typing it into the text box and pressing enter. Tags can only contain letters, numbers, colons, dashes, and underscores.

After creation, you can always edit the database’s tags or move it to another project; however, its name cannot be changed.

When you’re ready, click the Create a Database Cluster button.

Clusters typically take five minutes or more to provision, but you can complete important configuration tasks such as restricting inbound connections while you wait.