Postgres that sleeps for free.
Idle databases go dark and stop billing. The next query wakes them. Give every pull request and agent run its own, and pay only for the ones that are awake.
npm install -g @batadata/cliAn animated field of databases. Each one lights up when a query arrives and goes dark once it has been idle for a while. You only pay for the lit ones.
Scale to zero
Idle costs $0.Most of your databases are idle right now.
After 5 quiet minutes a database falls asleep and its compute meter stops. The next connection wakes it. That's the whole trick.
A month of 24 databases: 2 in production, 4 staging, 18 previews and agent sandboxes. Both lines use the same hourly rate. The only difference is who pays for the hours asleep. Drag across the month to scrub.
- Always on
- $259.20
- BataDB
- $27.00
Agent-native
Let your agents drive.The CLI speaks fluent JSON.
Agents spin up databases, branch them, break them and throw them away. They shouldn't need a human clicking through a console for any of it.
--jsonEvery API command answers in JSON, with exit codes a script can branch on.MCPPlug the same tools into Claude, Cursor or any agent that speaks MCP.App keysEach deployment gets its own Postgres role that only sees the tables you grant.
bata create agent-run-41 --json{ "name": "agent-run-41", "status": "active", "compute_ready": true, "connection": { "pooled": "postgresql://...-pooler.us-east-1.db.batadata.com/app" }}bata keys create --app --grant select:orders --json{ "kind": "app", "database_role": "app_agent_run_41", "grants": ["select:orders"]}
Branching
Branch anything.Branch fees never made sense to us.
A branch is a full copy of your database that shares storage with its parent. You pay for the data it writes and the hours it's awake. The branch itself costs nothing.
Try the risky migration on a branch first. Set an expiry and it deletes itself when you're done.
- main48 GB
- preview/pr-182shares main, +14 MBfee $0
- agent/run-41shares main, +2 MBfee $0
- stagingshares main, +310 MBfee $0
- migrate/add-indexshares main, +0 MB, expires in 2hfee $0
Moving in
Moving in is one command.It checks its own work.
Point bata import at any Postgres URL. It checks your extensions first, copies schema and data, then compares every table's row count and sequence on both sides.
bata import --source "$DATABASE_URL" --name shopbata import checks the source and your extensions, copies schema and data, then verifies every table's row count and every sequence on both sides.
Postgres 16 and 17
Real Postgres, so your drivers and ORMs won't notice the move.
Point-in-time restore
Rewind to any moment, up to 30 days back.
Query insights
See which queries cost the most, in dollars.
Bare-metal compute
Serverless on the outside, dedicated bare metal underneath.
Pricing
Up to half the priceof other serverless Postgres.
We priced a real bill both ways and ours came out about half. You pay three rates, metered by the millisecond, and nothing while a database sleeps.
- Compute
- $0.015
- an hour at the smallest size, while awake
- Storage
- $0.25
- a GB-month, shared by branches
- Transfer
- $0.08
- a GB after 500 GB
- Idle
- $0
- every database, every night
Free every month: 100 compute-hours, 1 GB of storage and 500 GB of transfer.
Wake your first database.
You get 100 free compute-hours every month, and sleeping doesn't use any of them.
npm install -g @batadata/cli