Relay Docs
Managed databases

Provisioning

Create a managed PostgreSQL cluster — engine and version, provider and region, machine tier, and single-node vs. high-availability.

You can provision a cluster from the dashboard (Provision in a workspace) or the CLI (relay db create). The dashboard offers a quick flow (a few choices, sensible defaults) and an advanced flow (full control over topology, backups, and security).

Engine & version

PostgreSQL is the engine available today, with versions 18 (latest), 17, and 16 selectable. The engine and version catalog is driven by what your organization's providers offer.

Provider & region

Choose where the cluster runs. Availability is provider-driven: Relay Cloud currently provisions PostgreSQL on AWS in us-east-1, and that is the only region you will see. Run relay db regions (or open the dashboard's provider picker) for the list available to your organization. See Regions.

Machine tier

Compute is chosen from tiers R5 through R200. Each tier fixes CPU, memory, and a base storage size — for example:

TiervCPUMemoryBase storageNotes
R50.51 GiB5 GiBFree-tier size, burstable
R1012 GiB10 GiBDefault, burstable
R3026.25 GiB40 GiBSmallest tier with its whole vCPU
R10048183 GiB1000 GiB
R20064244.5 GiB1500 GiBMaximum

Burstable tiers (R5, R10, R20) share their nodes: each is guaranteed a third of its vCPU and can use the full vCPU when the node has spare capacity. The full list with prices is in Why Relay.

You can resize the tier later. A resize restarts the cluster's nodes and is not zero-downtime: expect about 70 seconds of unavailability on a single-node cluster, and write gaps of roughly 10 and 30–40 seconds during the rolling restart of a high-availability cluster (details in Scaling). Storage and IOPS are tunable independently of the tier (storage from the tier's base size up to 16 TiB on gp3; see Scaling).

Architecture

  • Single node — one primary. Simple and lowest cost.
  • High availability — a primary plus a streaming replica with automatic failover. The dashboard selects this by default on paid plans; with the CLI, pass --ha (it defaults to off).

For advanced Postgres topologies (synchronous replicas, multi-region standby or stretched clusters), see Topology & multi-region.

Free plan: one R5 single-node database per organization, with up to 5 GiB of storage; the sample database test counts toward it. Create it from Quick mode (the Advanced flow requires a paid plan) or the CLI with --tier R5. High availability, more databases, and larger tiers require a paid plan.

Default connections

Enabling default connections auto-provisions three managed users — read-only, read/write, and admin — and matching Relay connections once the cluster is running, so your team can connect through the governance layer immediately. For granular per-user control, manage database users from the dashboard, the API, or Terraform (relay_postgresql_user); the CLI has no database-user commands.

Backups

Cloud backups are enabled by default. The advanced flow lets you set a snapshot time and retention tiers (hourly/daily/weekly/monthly). Point-in-time recovery is always on and its window follows the retention you choose. See Backups & restore.

From the CLI

# See the clouds, regions, and engines available to you
relay db regions

# Create a cluster (provisioning is async; --wait blocks until ready)
relay db create pg-prod \
  --engine postgres --version 18 \
  --cloud aws --region us-east-1 \
  --tier R10 --ha --wait

# Inspect
relay db list
relay db status <id>

--cloud and --region are both required, from CLI v0.6.0 on (today aws and us-east-1). Backups are on by default; pass --no-backups to disable them.

On this page