Instant data branching for PostgreSQL

Create Copy-on-Write branches for development and testing in seconds.
Works with any PostgreSQL cloud provider, including AWS RDS, Amazon Aurora, Google Cloud SQL, and more.

Instant branching with data

Copy-on-Write technology means you can create a branch with the full dataset from production in seconds.

Create branches from CI/CD

Create branches via the API from CI/CD pipelines and automate testing your changes in a production-like environment.

100% vanilla PostgreSQL

Branching is implemented at the block storage layer, underneath Postgres. This means we don't fork or modify PostgreSQL.

A database branch for every PR

Fast Copy-on-Write branches for every pull request.
No more waiting for shared environments or blocked by teammates’ changes.
1

Connect to your production database

Keep your production database where it is, whether it is AWS RDS, Aurora, GCP Cloud SQL, Azure Database, or even self-hosted.

2

Anonymize PII or other sensitive data

Mask sensitive data using configurable transformers that maintain referential integrity.

Learn more
3

Staging replica with realistic data

Get a nightly synced replica of production with sensitive data removed. Ready for testing.

Learn more
4

Instant dev branches

From the staging environment, instantly create Copy-on-Write branches for each pull request to accelerate development, testing, and collaboration.

5

Deploy to production without downtime

Apply database changes confidently with pgroll, serving old and new schema versions in parallel for smooth, lock-free migrations.

Learn more

Copy-on-Write technology at the storage layer

Xata implements data branching at the storage layer. This enables very fast branching operations, regardless of how large the data is. It also reduces the amount of disk space used. Let's look at how it works.

1

Initial state

In the initial state, we start with a single branch, the parent branch. The volume associated with this branch is mounted on the PostgreSQL instance. The data is organized into blocks (numbered 1 to 8 in the diagram) and an index is used to keep track of the blocks.

2

Creating a new branch

When a new database branch is created, initially only the index is copied. The new child branch references the same data blocks as the parent branch.

This is why the branching is so fast regardless of the size of the branch, because no significant amount of data is copied at this stage.

3

Copy only modified blocks

As writes are received, either by the parent branch or the child branch, the blocks that are written to are copied. When this happens, each branch references their own copy of the blocks. In the diagram, this has happened for blocks 3 and 6.

Assuming very few blocks are written after the branch operations, this results in significant disk space savings.

Learn more about the Xata storage layer

Get started with Xata

Sign up to access the Xata platform or book a demo to learn how Xata works from the engineers who built it.