pgrun.dev Docs
Managed PostgreSQL that spins up in a couple of minutes. Connect, and we handle backups, monitoring, and upgrades.
Overview
Every pgrun.dev database is a dedicated, isolated PostgreSQL instance — not a shared schema. You get a standard Postgres connection string and can use it with any language, framework, or GUI tool. We take care of the rest:
- Automated backups — daily base backups plus continuous WAL, stored off-site.
- Metrics & logs — CPU, memory, connections, cache hit ratio, and live server logs in the dashboard.
- Encrypted connections — TLS is required on every connection.
- One-click resize & upgrades — grow compute or storage, or move to a new Postgres version.
Create a database
In the dashboard, pick a server size, storage, and PostgreSQL version, then continue to payment. Your database provisions and is usually ready in 3–6 minutes — you'll get a "database is ready" email when it's live.
Connection string
Open your database in the dashboard → Overview, and copy the connection string. It looks like this:
postgres://USER:PASSWORD@HOST:5432/postgres?sslmode=require&channel_binding=require
Most drivers and tools accept this URL directly — as a DATABASE_URL environment variable, or split into host/port/user/password/database fields.
Connecting with psql
Paste the whole connection string:
psql "postgres://USER:PASSWORD@HOST:5432/postgres?sslmode=require"
Then run a quick check:
SELECT version();
\l -- list databases
\dt -- list tables
Connecting from your app
Set the connection string as DATABASE_URL and let your framework read it.
Ruby on Rails
# config/database.yml
production:
url: <%= ENV["DATABASE_URL"] %>
Node.js (node-postgres / Prisma)
// node-postgres
const { Pool } = require("pg");
const pool = new Pool({ connectionString: process.env.DATABASE_URL, ssl: { rejectUnauthorized: true } });
// Prisma — schema.prisma
datasource db { provider = "postgresql"; url = env("DATABASE_URL") }
Python (psycopg / Django)
# psycopg
import psycopg
conn = psycopg.connect(os.environ["DATABASE_URL"])
# Django settings.py
import dj_database_url
DATABASES = { "default": dj_database_url.parse(os.environ["DATABASE_URL"]) }
GUI tools
Any standard PostgreSQL client works. Paste the connection string, or fill the host / port / user / password / database fields from your Overview page — and make sure SSL is enabled.
- TablePlus — create a PostgreSQL connection, set SSL mode to "require".
- DBeaver — new PostgreSQL connection → SSL tab → enable "Use SSL".
- pgAdmin — register server → Connection tab, and set SSL mode to "require".
SSL & security
Every connection to a pgrun.dev database is encrypted with TLS — plaintext connections are rejected. Use sslmode=require (or stronger). For the strongest protection against man-in-the-middle attacks, keep channel_binding=require in the connection string, which most modern drivers support.
Metrics
The Metrics tab shows performance signals for your database, over a selectable time range, updating automatically. Use them to spot saturation before it becomes an outage.
| Metric | What it measures | What to watch for |
|---|---|---|
| CPU Usage | CPU time across user, system, iowait, and steal modes. | Sustained high user/system time → consider a larger server. |
| Load Average | Average CPU demand over 1/5/15 minutes. | Above your core count = processes waiting for CPU (overload). |
| Memory Usage | Used, cached, and buffered memory. | Used consistently >90% can degrade performance. |
| Disk Usage | Data directory space (tables, indexes, WAL, logs). | Near 100% → increase storage before writes fail. |
| Disk I/O | Read/write operations per second. | Sustained highs indicate an I/O-bound workload. |
| Network Traffic | Inbound/outbound bytes per second. | Unusual spikes may signal a runaway query or client. |
| Connection Count | Active and total client connections (max 500 default). | Near the limit → add pooling (PgBouncer) or raise it. |
| Cache Hit Ratio | Share of reads served from cache. | Normally >99%; lower suggests more memory would help. |
| Operation Throughput | Rows fetched/inserted/updated/deleted per second. | Sudden changes = a shift in your workload. |
| Deadlocks | Deadlock detection rate. | Non-zero often points to a locking/design issue. |
| Database Size | Size of your largest databases. | Unexpected growth to investigate. |
| Transactions | Committed and rolled-back transactions per second. | Rising rollbacks can indicate application errors. |
Logs
The Logs tab streams your database's server logs with color-coded severity (INFO, WARNING, ERROR, FATAL). Choose a time range (30m / 1h / 2h / 4h) and how many lines to show (50 – 500). Logs are the fastest way to diagnose a failing query, a connection storm, or an authentication problem.
Backups & restore
Backups run automatically — a daily base backup plus continuous write-ahead logs — and are stored off the database host, so a host failure never takes your backups with it. From the Backup / Restore tab you can restore to a new database at a point in time within the retention window.
Resize & upgrade
From your database's sidebar you can:
- Resize — increase compute (vCPU/RAM) or storage. Your monthly price updates to match.
- Upgrade — move to a newer PostgreSQL major version.
- High availability & read replicas — add standby/replica nodes for resilience and read scaling.
- Configuration — tune Postgres parameters.
Support
Stuck or have a question? Email support@postgresrun.com and we'll help. Include your database name so we can look it up quickly.