---
title: "Xata – the branch native Postgres platform"
description: "Postgres platform with instant branching and scale-to-zero compute."
source: "https://xata.io/"
---

[Xata is open source ⭐](https://github.com/xataio/xata)

# A Postgres branch for every pull request

The Postgres platform with instant branching and scale-to-zero compute.

[Get started](https://console.xata.io/signup)

A production Postgres database branches into four active isolated environments while capacity lanes represent hundreds more production-like branches.

ProductionPrimary

Postgres 18.3

Production-like data

Healthy99.99% uptime1,324 branches

PR #842

Add billing

Full copy ready2.2s

PR #843

Update schema

Full copy ready2.1s

PR #844

Checkout redesign

Full copy ready2.3s

PR #845

New permissions

Full copy ready2.0s

## Engineering teams use Xata for agentic development

![SafeStreets logo](https://xata.io/images/client-logos/safestreets.webp)

![Jobflow logo](https://xata.io/images/client-logos/jobflow.png)

![MotherDuck logo](https://xata.io/images/client-logos/motherduck.png)

![Clarify logo](https://xata.io/images/client-logos/clarify.png)

## Modern development needs more than a single staging database.

Coding agents multiply the number of changes happening at once. A single shared database cannot safely support all those migrations, tests, and experiments.

Shared staging puts four workflows in one database, causing migration conflicts, failed tests, overwritten data, and waiting. Xata creates four isolated Postgres branches with production-like data so every workflow can run independently without conflicts.

Benefits

## Change schemas safely

Run migrations and test schema changes without affecting production or anyone else’s work.

## Test with production-like data

Catch issues that empty databases, fixtures, and mocks cannot reveal before changes ship.

## Work in parallel

Give every developer, agent, and preview an isolated database without waiting on shared staging.

## Clone any Postgres database in seconds

Create isolated branches from production without copying the full database. Each branch gets its own schema, compute, and production-like data.

## Copy-on-write storage

Using copy-on-write storage, each branch shares data with its parent and stores only changes instead of creating full copies.

## Scale to zero

Run branches only when needed. When idle, they hibernate and use no compute.

## Wake on the first query

Branches wake on first query and respond instantly: no connection timeouts, no spin-up delays.

## Upstream Postgres

Branching happens in the storage layer, not through a custom Postgres fork, so you keep standard PostgreSQL, extensions, drivers, and tooling.

Automate every branch

## Created when work starts. Removed when it ends.

Connect Xata to GitHub, CI, or your coding agents. A Postgres branch is created automatically for every task, pull request, or preview and removed when the work is complete.

Automated

### Pull requests

Create a production-like database branch when a pull request opens. Run migrations and tests against it, then delete it after merge.

PR #842

PR #842: Pull request opened, branch created, Tests passed.

Automated

### Coding agents

Let agents create isolated branches through the API or MCP, safely modify schemas and data, and clean up when the task finishes.

Claude task

Claude task: Coding session started, branch created, Migration applied.

Automated

### Preview deployments

Connect every preview to its own Postgres branch so the complete application, code, schema, and data, can be validated before publishing.

Preview #319

Preview #319: Preview deployment, branch created, Preview live.

How to get started

## Adopt Xata without moving production.

Keep production where it is, or move it to Xata. Either way, every pull request and deployment preview gets its own isolated Postgres branch.

Path 01

### Keep prod where it is

Create a clone of your production database in Xata, keep it in sync with production, and have it ready for instant branching.

- Branches from a production clone
- Production data with built-in anonymization
- Continuously synced with production

[Create a production clone](/use-cases/ci-cd)

Path 02

### Run production on Xata

Run your production database on Xata with native branching, built-in high availability, read replicas, and automatic scale-to-zero.

- Native branches from production
- High availability
- Read replicas

[Create a production database](/use-cases/production-postgres)

## Production-ready Postgres

Xata runs vanilla PostgreSQL with high-performance storage, isolation, and instant branching built in.

Xata includes built-in production observability for your database — uptime, query latency, throughput, and active connections.

## Vanilla Postgres

No forks and no compatibility issues.

## High availability

Automatic failover to read-replicas.

## PITR backups

Restore your database to any point in time.

## Premium storage

Low latency and high throughput storage.

Example

## What does a database per pull request cost?

Consider a company creating 100 pull requests per day against a 100 GB production database. With traditional database infrastructure, giving every pull request its own isolated database quickly becomes unsustainable.

Traditional Database

- Per database compute

  24 hrs

- Per database storage

  100 GB

- Total compute

  100 × 24 = 2,400 hours

- Total storage

  100 × 100 GB = 10 TB

With Copy-on-Write & Scale-to-Zero

- Per database compute

  ~ 5 min

- Per database storage

  3 GB modified

- Total compute

  100 × 5 min = 9 hours

- Total storage

  100 GB + (100 × 3 GB) = 400 GB

Built for platforms

## Add branch-native Postgres to your product

Give every user, workspace, preview, or coding agent an isolated Postgres branch, created through one API and managed by Xata.

01

### Provision instantly

Create a new Postgres database in a second through a simple API.

02

### Branch at any scale

Create a production-like branch in seconds, regardless of database size. Scale to zero when idle and wake in about a second.

03

### Scale to millions

Support large numbers of short-lived databases without duplicating storage or paying for idle compute.

04

### Deploy on your terms

Use Xata Cloud or run in your own cloud with BYOC, private networking, and regional control.

[Explore Xata for platforms](/solutions/platforms)

## What our users are saying

See what engineers, builders and leaders are saying about Xata.

![logo-Jordan Tigani](/api/media/file/motherduck-logo.png)

> Xata is currently the best way to run the pg_duckdb extension in the cloud. The platform’s flexibility and API access make Xata the perfect PostgreSQL partner for us.

Jordan Tigani

CEO, MotherDuck

![logo-Chris Windsor](/api/media/file/safestreets-logo.png)

> Xata was an easy choice for our team because of how straightforward the entire platform is, while simultaneously providing a suite of adequate features that we need. The Xata team has also been super responsive and more importantly quick to resolve the hiccups that we brought upon ourselves.

Chris Windsor

Lead Software Engineer, Safestreets

![logo-Jignesh Chauhan](/api/media/file/callkarma-logo.png)

> By adopting Xata, we cut database costs vs. our RDS setup and got better help from Postgres experts.

Jignesh Chauhan

Co-founder, CallKarma.ai

![logo-Ben Hubsch](/api/media/file/saasgrid-logo.png)

> Xata was a no-brainer for our team. We get a lot of value out of the copy-on-write database branching and scale-to-zero features.

Ben Hubsch

Software Engineer, SaaSgrid

## Branch your database in seconds

[Get started](https://console.xata.io/signup)[Get in Touch](https://cal.com/team/xata/xata-sales)
