Copy-on-write
A branch starts from its parent’s data without copying it.
Every pull request gets its own Postgres branch, copied from production or staging. It is created when the pull request opens and deleted when it closes.
A branch starts from its parent’s data without copying it.
Each pull request gets an isolated Postgres database.
The branch goes away when the pull request merges or closes.
Most teams review migrations against a shared staging database that does not look like production.
The branch reads its parent’s data and keeps only what the pull request changes, so it is ready in about three seconds with the full schema and rows.
A developer or a coding agent opens a pull request.
The Xata GitHub App creates a branch from the root branch you picked, staging if you have one and production otherwise, and comments the branch name on the pull request.
Run the migration on the branch with xata roll migrate and point the app at it. Reviewers see the change against the real schema and real rows.
When the pull request merges or closes, the GitHub App deletes the branch. Nothing is left running.
Xata separates Postgres compute from copy-on-write storage.
Connect the Xata MCP server or install the CLI, and your coding agent can create branches, apply migrations and read schema without touching production.
If production holds personal data, copy it into Xata with masking rules applied and branch pull requests from the masked copy.
Learn moreRehearse the migration on the branch, then apply it to production with pgroll, which serves the old and new schema side by side.
Learn moreRun every migration on a branch with real data before it reaches production.