Postgres 16 and 17 · $0 idle

Branch a databaselike you branchthe code.

Serverless Postgres with copy-on-write branching, compute that suspends when nobody is querying, and a CLI an agent can drive end to end without a human in the loop.

No credit card. The free tier runs a real project.

$ bata db branch createcopy-on-write
mainwrites continue
staging0 B
pr-41920 B

Both branches hold the whole database. Storage grows only where a branch diverges from its parent.

01Branching

A branch is a database, not a copy of one.

Fork production, point a preview environment at it, throw it away. The fork is instant because nothing is copied: it shares its parent's pages until you write.

Fork point
Now, an LSN, or a timestamp

Pin a branch to an exact point in the write-ahead log for a preview that is reproducible next week.

Cost at creation
$0

A fork shares its parent's storage until it is written to. Idle compute bills nothing.

Isolation
Full read/write

Writes on a branch never reach the parent. Reset it from the parent, or delete it, whenever.

Lifetime
Yours, or expiring

Give a preview branch a planned expiry so a stale environment is not found six weeks later on the bill.

02Platform

The rest of it.

What you get once the database exists. No add-ons, no separate SKUs.

Agent-native CLI and API

Every command runs headlessly with one API key and JSON output, and returns a real exit code. Provisioning, branching, querying, and cost are all scriptable, so an agent can operate a database with no human in the loop.

bata db query --json

Scale-to-zero compute

Compute suspends after inactivity and wakes on the next connection. You are billed for the milliseconds it serves traffic, not for the hours it sat there.

idle → $0.00

Query insights

Built on pg_stat_statements: per-query latency, execution counts, cache hit ratios, and slow-query detection, with the compute cost attributed back to the queries that caused it.

cost by fingerprint

Autoscaling

Compute scales between a floor and a ceiling you set, on connection demand. Set min and max CU and the platform handles the rest.

0.25 – 8 CU

Connection pooling

Transaction-mode pooling is built in, and there is an HTTP SQL endpoint for edge runtimes that cannot hold a TCP connection open.

pooled + HTTP

Teams and access control

Organizations with owner, admin, member, and viewer roles. API keys scope to a team, and every mutating action lands in an audit log.

RBAC + audit
03Start

Four commands.

Create a project, connect, branch it, or bring a database you already have.

# Create a project and wait until it is ready
$ bata create my-app
Project my-app is ready.
# Connect with anything that speaks Postgres
$ psql $(bata db url)
psql (16.4)
# Fork it. Isolated, and free until it diverges
$ bata db branch create pr-4192
Branch 'pr-4192' created.
# Already have a database somewhere else?
$ bata import --source "$DATABASE_URL"
Streams pg_dump straight in, no dump files.
Verifies row counts and sequences on both sides.

Every one of those returns JSON with --json and a meaningful exit code, which is the whole reason an agent can run this without supervision.

Start free
04Cost

Pay for what runs. Nothing else.

Every number below is a real rate, not an illustration. Compute bills only while it is serving traffic, so an idle project costs $0. Drag the inputs and watch the bill.

Estimate your bill
Real rates · $0.01/CU-hr · $0.25/GB-mo
Active hours / day8h

Scale-to-zero means you're billed only for the hours it actually serves traffic. Idle time costs $0.

5 GB
1 GB200 GB
Estimated monthly cost
$2.40/mo

After your free 100 CU-hours and 1 GB storage are applied.

Compute
1 CU × 8h/day → 240 CU-hrs− 100 free
$1.40
Storage
5 GB × $0.25/GB-mo− 1 GB free
$1.00
Transfer
Egress
Not metered yet

An always-on server this size would cost $6.20 in compute. Scale-to-zero saves you $4.80/mo.

Start free, no credit card

Estimate only. You're billed per millisecond of active compute, so real bills track usage exactly.

Start free. Grow into usage.

The free tier runs a real project, not a demo. Paid is the same product with bigger limits, billed at cost, never a paywall.

Free
$0forever

Enough to run a real side project, not a demo.

Compute
100 CU-hrs/mo
Storage
1 GB
Transfer
5 GB
Branching and scale-to-zero
Query insights and CLI
Start free
Pay-as-you-goRecommended
Usage

Everything in Free, then only what you actually use, billed at the rates above.

Compute
$0.01 / CU-hr
Storage
$0.25 / GB-mo
Transfer
not metered yet
Compute ceiling
8 CU
Projects and branches
unlimited
No caps, no per-seat fees
Start free, upgrade anytime
Team and Enterprise
Talk to us

For teams that need scale, controls, and a human on call.

Everything in Pay-as-you-go
Volume compute and storage discounts
Role-based access control
SSO and audit logs
Priority support and SLAs
Contact sales

Give an agent a database it can actually run.