Skip to content

Feature Request: Native Database Branching (Git-like, Copy-on-Write Snapshots) #155337

@hkemon

Description

@hkemon

Description:
I would like to request the implementation of a native database branching feature in CockroachDB, similar to Neon’s branching model (Neon Branching Docs). The feature would allow users to:

  • Create lightweight branches (snapshots) of a database at a given point in time.
  • Work on these branches independently without affecting the main database.
  • Merge changes back into the main database or other branches.

Motivation:
This feature would greatly enhance development workflows, enabling:

  • Safe experimentation on production-like data.
  • Git-like workflows for databases, useful for testing, staging, and feature development.
  • Easier collaboration between developers with isolated database states.

Currently, while CockroachDB provides MVCC and AS OF SYSTEM TIME, these mechanisms allow only historical access and require manual backup/restore workflows to simulate branching. A native implementation would simplify these workflows and bring CockroachDB closer to modern developer expectations for branching/versioning in databases.

Suggested Features / Requirements:

  1. Lightweight, copy-on-write branches that do not duplicate the entire database unnecessarily.
  2. Ability to merge branches with conflict resolution support.
  3. Optionally, integration with AS OF SYSTEM TIME to reference historical states when creating branches.
  4. Support for branch lifecycle management (create, delete, list, merge).

Use Cases:

  • Development and testing of features on real production data without risking the main database.
  • Creating staging environments quickly for QA or performance testing.
  • Versioned experimentation, rollback, and collaborative workflows.

References:

I believe this feature would be a valuable addition to CockroachDB and greatly improve developer productivity and operational flexibility.

Jira issue: CRDB-55387

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-disaster-recoveryC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)O-communityOriginated from the communityT-disaster-recoveryX-blathers-triagedblathers was able to find an owner

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions