A database branch
for every pull request
No more waiting for shared environments or blocked by teammates' changes.
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.
Move fast without breaking production
Adopt Xata for dev and testing without changing, migrating, or relocating your production databaseConnect 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.
Anonymize PII or other sensitive data
Mask sensitive data using configurable transformers that maintain referential integrity.
Learn moreClone the production database
Get a nightly synced clone of production with sensitive data removed. Ready for testing.
Learn moreInstant dev branches
From the production clone, instantly create copy-on-write branches for each pull request to accelerate development, testing, and collaboration.
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 moreCopy-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.
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.
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.
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.