---
title: "Database Branching in Postgres: Git"
description: "Shared staging databases often drift as schemas diverge, test data accumulates, and developers avoid creating isolated environments because traditional pg_dump copies are slow and expensive. Databricks Lakebase Postgres addresses this with database branching, which creates fully isolated environments from a parent’s exact schema and data at a point in time. Branches use copy-on-write: they share underlying versioned storage until a branch changes, then record only new data, while each branch has independent compute and a separate connection string. Idle branches scale compute to zero, and storage cost tracks changes rather than the full database size. This supports per-developer, per-pull-request, per-test-run, and recovery workflows, including point-in-time branching within the restore window, with the source describing branch creation through the console, CLI, or API in under a minute."
---

# Database Branching in Postgres: Git

[Databricks](https://yomu.fyi/company/databricks) · Susan Pierce · Sep 18, 2026

**Type:** Problem & solution

## Summary

Shared staging databases often drift as schemas diverge, test data accumulates, and developers avoid creating isolated environments because traditional pg\_dump copies are slow and expensive. Databricks Lakebase Postgres addresses this with database branching, which creates fully isolated environments from a parent’s exact schema and data at a point in time. Branches use copy-on-write: they share underlying versioned storage until a branch changes, then record only new data, while each branch has independent compute and a separate connection string. Idle branches scale compute to zero, and storage cost tracks changes rather than the full database size. This supports per-developer, per-pull-request, per-test-run, and recovery workflows, including point-in-time branching within the restore window, with the source describing branch creation through the console, CLI, or API in under a minute.

## Context

Traditional Postgres environments commonly rely on a shared staging database or full production copies. The source describes schema drift, polluted test data, stale environments, flaky CI, and the cost of copying large databases as barriers to isolated development workflows.

## Approach / What changed

Lakebase separates Postgres compute from distributed, versioned storage. A branch gets independent compute and a connection string while sharing its parent’s stored data through copy-on-write; changes are recorded separately. Branches can also be created from a point in time within the restore window, scale idle compute to zero, and be deleted when no longer needed.

## Takeaways

- Database branches include both schema and data, start from a parent’s exact state, and provide full isolation through independent compute and connection strings.
- Copy-on-write means branches share unchanged storage and consume additional storage only for their modifications; idle branch compute scales to zero.
- Branches support isolated environments per developer, pull request, or test run, as well as point-in-time recovery without restoring a traditional backup.

## FAQ

### How does a Lakebase branch avoid copying an entire Postgres database?

Branches share the parent’s underlying versioned storage and write only changes made after branching. This copy-on-write model makes creation time independent of database size and makes storage proportional to changes.

### Can a branch include production-like data and remain isolated?

Yes. A branch starts with the parent’s exact schema and data at a specific point in time, then runs with independent compute and its own connection string. Changes on the branch are written separately from the parent.

### How can database branching support recovery after a bad change?

A branch can be created from any point within the configurable restore window. The source says this allows teams to inspect dropped tables, debug failed migrations, or audit historical data without touching production.

**Tags:** [Databases](https://yomu.fyi/topic/databases), [Lakebase](https://yomu.fyi/topic/lakebase), [Postgres](https://yomu.fyi/topic/postgres)

- Source: [Databricks](https://www.databricks.com/blog/database-branching-postgres-git-style-workflows-databricks-lakebase)
- Source URL: https://www.databricks.com/blog/database-branching-postgres-git-style-workflows-databricks-lakebase
- Ingested by Yomu: 2026-09-17T14:06:19.416Z

[Read original post](https://www.databricks.com/blog/database-branching-postgres-git-style-workflows-databricks-lakebase)
