---
title: "Use real data in dev workflows"
description: "Get instant copy-on-write branches from your production PostgreSQL, without relocating your database. Works with any cloud provider."
source: "https://xata.io/realistic-staging-dev"
---

Use real data
in dev workflows
================

Get instant copy-on-write branches from your production PostgreSQL, without relocating your database. Works with any cloud provider.

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

### Realistic data

In order to catch bugs before they hit production, it's important to test with a realistic data set. Seeded or generated data is often not enough.

### PII detection and data anonymization

Removing sensitive data from your staging/testing dataset is important for privacy and security. Automate removing PII and sensitive data when syncing data from production.

### A database branch for each PR

Spin up a Copy-on-Write PostgreSQL branch for each pull request, with anonymized data. Create preview environments to test your changes and new features.

### Optimize database performance

Test performance improvements on instant database branches with the full dataset from production. Test new indexes and query patterns before they hit production.

### Speed up development

When many developers are working on the same staging database, they have to wait for each other. With Xata, you can spin up a copy-on-write branch for each developer, and they can work in isolation.

### Manage complex database changes

Test your schema changes in your dev and staging environments, create a pgroll plan, then apply to production with guaranteed zero-downtime.

## Move fast without breaking production

Adopt Xata for dev and testing without changing, migrating, or relocating 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.

Mask sensitive data using configurable transformers that maintain referential integrity.

[Learn more](/postgres-data-masking)

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

From the production clone, instantly create copy-on-write branches for each pull request to accelerate development, testing, and collaboration.

[Learn more](/postgres-branching)

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

[Learn more](/postgres-schema-changes)

## Why real data workflows matter

Dev workflows only help if they feel like prod. Without real patterns and instant branches, teams slow down and bugs slip through.

### The challenges you're facing

- **Developer bottlenecks while waiting for "staging".**
- **Tiny datasets hide real bugs.**
- **Staging copies risk exposing PII.**
- **"Schema changes feel risky."**

### How Xata solves them

- **Instant dev branches.** Spin up isolated DB branches per PR.
- **Production-like test data.** Seed rich, realistic datasets.
- **Privacy by design.** Automatic PII anonymization.
- **Zero-downtime migrations.** Ship schema changes safely.

## Simplify your schema changes workflow

You can use the Xata CLI to easily create and switch database branches during development and to integrate Xata into your CI/CD.

## Use our cloud, or bring your own

Xata

Option 01

### Xata Cloud

The easiest option to get started with.

- PII and sensitive data stripped before it leaves your account
- SOC 2 and HIPAA compliant

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

![AWS](/images/byoc/aws-dark.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)![Azure](/images/byoc/azure.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)![GCP](/images/byoc/gcp.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)

Option 02

### Bring your own cloud (BYOC)

A fully managed Xata service for large-scale deployments, running in your own cloud account.

- Deployed in your AWS, Azure or GCP account
- Best for security and compliance

[Learn more about BYOC](/byoc)



Find answers to common questions about Xata

[Still have questions? Talk to us](https://cal.com/team/xata/xata-sales)

## Branch your database in seconds

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

## Frequently Asked Questions

### Will Xata alter my production database?

No. Xata reads from production to create a staging replica but never modifies your live database. Your primary data remains untouched. The process that copies the data is similar to pg_dump and can be executed against a read replica.

### Can I bring my own cloud infrastructure?

Yes. Xata runs on AWS, Azure, GCP, or even self-hosted setups, so you maintain full control over your data without migrating to a new provider. In the Bring Your Own Cloud model, the control plane is maintained in our account, but the actual Postgres instances run in your account.

### How does data anonymization work?

Xata replaces PII with deterministic random values, preserving structure while ensuring privacy and compliance.

### Can Xata integrate with GitHub Actions, Jenkins, or other CI pipelines?

Yes. Xata provides APIs and a CLI for automated environment creation, allowing seamless integration into your CI/CD workflows for continuous testing.

### How do ephemeral environments improve development speed?

Ephemeral environments let you instantly branch databases with realistic data resembling production, providing every developer or feature branch with a dedicated testing setup. This way, they do not need to wait for a shared staging environment.

### Can Xata help with performance tuning?

Yes. Xata creates instant Copy-on-Write branches with enough data, letting you test indexes, query plans, and configuration changes before deploying to production.

### Do I need to modify my existing database schema for Xata?

No. Xata works with your current schema and config, creating staging and developer databases without requiring any schema changes.

### Can I test complex schema changes with Xata?

Yes. Xata enables zero-downtime, reversible schema updates using a multi-schema versioning approach, so you can safely test ALTER statements, backfills, and index changes before applying them.
