๐ŸŒ
Databricks
databricks.com โ€บ blog โ€บ database-branching-postgres-git-style-workflows-databricks-lakebase
Database Branching in Postgres: Git-Style Workflows with Databricks Lakebase | Databricks Blog
April 10, 2026 - Because storage is versioned, multiple branches can reference the same underlying data without risk of conflict. Because compute is independent, each branch runs its own Postgres process and scales on its own.
๐ŸŒ
Reddit
reddit.com โ€บ r/postgresql โ€บ gitstyle branching for local postgresql
r/PostgreSQL on Reddit: GitStyle branching for local PostgreSQL
December 7, 2025 -

Hey, just wanted to share my tiny tool with the community.
This is an OSS CLI tool that helps you manage databases locally during development.

https://github.com/le-vlad/pgbranch

Why did I build this?

During the development, I was quite often running new migrations in a local feature branch; sometimes they were non-revertible, and going back to the main branch, I realized that I had broken the database schema, or I just needed to experiment with my data, etc.

This is a simple wrapper on top of PostgreSQL's CREATE DATABASE dbname TEMPLATE template0;

Appreciate your thoughts on the idea.

Discussions

Pg_branch: Experimental Postgres extension brings Neon-like branching
I think this should be really straightforward by using one database as a template for another. This is how Postgres's create database works and it defaults to Template1 ยท https://www.postgresql.org/docs/current/manage-ag-templatedb More on news.ycombinator.com
๐ŸŒ news.ycombinator.com
67
193
October 10, 2023
How are you managing isolated Postgres database branches for preview deployments /CI?
For quick and cost effective solution, yes Vercel and Neon are the way to go. Docker and RDS are a great solution but, the evolution of tech always leans toward efficiency. Unless your project is massive, you are not outgrowing Vercel or Neon anytime soon. I think it's a great solution. More on reddit.com
๐ŸŒ r/SQL
18
7
June 9, 2026
pgbranch - git-style branching for PostgreSQL
It looks great. I will give a try. Thank you! More on reddit.com
๐ŸŒ r/selfhosted
6
22
December 10, 2025
๐ŸŒ
Xata
xata.io โ€บ blog โ€บ neon-vs-supabase-vs-xata-postgres-branching-part-1
Neon vs Supabase vs Xata: Postgres Branching Compared by Alex Francoeur
April 3, 2026 - Multiple platforms have emerged to tackle this, each with a unique approach. Neon popularized the idea of copy-on-write branches in Postgres, letting teams spin up full data copies in seconds. Supabase integrated database branching with git workflows, providing full-stack preview environments for every feature branch.
๐ŸŒ
Xata
xata.io โ€บ postgres-branching
Instant branching
Spin up a full Postgres database in seconds, regardless of size, no waiting for copies or restores. Branches automatically stop when idle, so you don't pay for compute you're not using.
๐ŸŒ
Neon
neon.com โ€บ branching
Mastering Database Branching Workflows
A new paradigm for managing Postgres. Instantly create, test, preview, and roll back environments with Neonโ€™s powerful database branching.
๐ŸŒ
PlanetScale
planetscale.com โ€บ docs โ€บ postgres โ€บ branching
Branching - PlanetScale
When your PostgreSQL database is first initialized, a single production branch is created called main which acts as the default branch. You can then create development branches that you can use for development before shipping schema changes ...
๐ŸŒ
GitHub
github.com โ€บ le-vlad โ€บ pgbranch
GitHub - le-vlad/pgbranch: Git style branching for local PostgreSQL ยท GitHub
pgbranch init -d <database> Initialize pgbranch pgbranch branch List all branches pgbranch branch <name> Create a branch from current state pgbranch checkout <name> Switch to a branch pgbranch delete <name> Delete a branch pgbranch status Show current branch and info pgbranch log Show all branches with details pgbranch hook install Install git hook for auto-switching pgbranch hook uninstall Remove the git hook pgbranch diff <branch1> [branch2] Compare schemas between branches pgbranch merge <source> <target> Merge schema changes (Beta) pgbranch migrate -c <config.yaml> Migrate database via logical replication ยท -d, --database Database name (required) -H, --host PostgreSQL host (default: localhost) -p, --port PostgreSQL port (default: 5432) -U, --user PostgreSQL user (default: postgres) -W, --password PostgreSQL password
Author ย  le-vlad
๐ŸŒ
Medium
medium.com โ€บ @bela.vanek โ€บ on-prem-database-branching-with-postgresql-github-actions-8a6c28f73895
On-prem database branching with PostgreSQL & GitHub ACTIONS | by Bรฉla Vanek | Medium
February 21, 2026 - With help of the logical replication of Postgresql, we can create a replica โ€” a clone if you like and with the steps below, we can shape it into a TEST database. Essentially, we are โ€œreplayingโ€ all DML statements executed on the primary node, on the logical replica, and when there is a push on a new branch ...
Find elsewhere
๐ŸŒ
GitHub
github.com โ€บ NAlexPear โ€บ pg_branch
GitHub - NAlexPear/pg_branch: Experimental Postgres extension for quickly branching databases through file system snapshots ยท GitHub
A Postgres extension for quickly creating "branches" of individual databases within a Postgres cluster using copy-on-write file systems like BTRFS.
Starred by 357 users
Forked by 9 users
Languages ย  Rust 93.2% | Shell 6.8%
๐ŸŒ
Hacker News
news.ycombinator.com โ€บ item
Pg_branch: Experimental Postgres extension brings Neon-like branching | Hacker News
October 10, 2023 - I think this should be really straightforward by using one database as a template for another. This is how Postgres's create database works and it defaults to Template1 ยท https://www.postgresql.org/docs/current/manage-ag-templatedb
๐ŸŒ
GitHub
github.com โ€บ sastraxi โ€บ pgsh
GitHub - sastraxi/pgsh: Branch your PostgreSQL Database like Git ยท GitHub
Note that this test suite will ... postgres server, so it will force you to send a certain environment variable to confirm this is ok. pgsh init generates a .pgshrc file for your project. ... pgsh or pgsh list <filter?> prints all databases, filtered by an optional filter. Output is similar to git branch...
Starred by 602 users
Forked by 16 users
Languages ย  JavaScript 99.8% | Shell 0.2%
๐ŸŒ
Xata
xata.io โ€บ blog โ€บ open-source-postgres-branching-copy-on-write
Xata - open source Postgres platform with CoW branching by Tudor Golubenco
April 22, 2026 - Xata core is now available as open source under the Apache 2 license. It adds copy-on-write branching, scale-to-zero compute to Postgres.
๐ŸŒ
Reddit
reddit.com โ€บ r/sql โ€บ how are you managing isolated postgres database branches for preview deployments /ci?
r/SQL on Reddit: How are you managing isolated Postgres database branches for preview deployments /CI?
June 9, 2026 -

Hey everyone, Iโ€™m looking at workflows to optimise how we spin up staging databases for app previews. Iโ€™ve been experimenting Neonโ€™s serverless architecture (specifically looking at how Databricks integrates it for Lakebase) to use its instant database branching.

Being able to use a Vercel integration to automatically spin up an isolated database branch for a preview deployment, run schema migrations, test a data app and tear it down without duplicating storage costs or impacting production seems like a massive win for modern dev.

For those running serverless Postgres in production, are you relying heavily on these types of branching workflows, or are you still doing it in the old fashioned way with Docker or isolated RDS staging instances.

Top answer
1 of 8
1
For quick and cost effective solution, yes Vercel and Neon are the way to go. Docker and RDS are a great solution but, the evolution of tech always leans toward efficiency. Unless your project is massive, you are not outgrowing Vercel or Neon anytime soon. I think it's a great solution.
2 of 8
1
hi u/Shanjun109 One thing worth flagging, since the thread is all Neon/Lakebase: that branching model assumes your production already lives on Neon. If you're running prod on RDS, Aurora, or Cloud SQL (which it sounds like you might be) getting that workflow means migrating your primary onto Neon first. The copy-on-write mechanics people are describing are right, though. If you want the workflow without moving production, leave prod on RDS and let a separate system maintain a continuously replicated copy in sync. Branches are copy-on-write forks of that copy, Xata does exactly this. (Full disclosure: I work there, so salt to taste.) There was a comment about data masking, and that's the actual gotcha with prod preview branches. Clone real prod data and you've now got PII sitting in N ephemeral databases that preview apps and CI logs can reach. Xata can anonymize the data when the production clone is created so the PII never lands in the branch. Branching beats Docker and RDS clones for prod-shaped previews. I agree with the thread there. Just nail down whether your option needs you to migrate prod first and how you handle anonymization, because that's the line that actually decides it for most teams.
๐ŸŒ
Filip-prochazka
filip-prochazka.com โ€บ blog โ€บ database-branching-in-postgresql
Database branching (just like with git) in PostgreSQL
November 8, 2021 - Sadly, PostgreSQL does not have a real branching feature. But it has something that can be used as such - the CREATE DATABASE command. It allows you to copy the entire database with all its data via a single command, and it does so really fast.
๐ŸŒ
PostgresAI
postgres.ai โ€บ blog โ€บ 20250721-dblab-engine-4-0-released
DBLab 4.0: instant database branching with O(1) economics | PostgresAI
July 21, 2025 - # Create a clone to work with dblab clone create --branch main --id my-clone-id --username postgres --password <your-password> # Connect to your clone and make some changes psql -h localhost -p 6001 -U postgres # port may be different ...
๐ŸŒ
Vela
vela.simplyblock.io โ€บ database-branching
Database Branching for Postgres | Vela - simplyblock
Give developers and CI pipelines isolated, production-like Postgres environments for every meaningful change. Vela turns database branching into a platform workflow: create a branch, validate code and schema changes, review the result, then clean it up without relying on a shared staging database.
๐ŸŒ
Branchd
branchd.dev
Branchd - PostgreSQL branching
Open-source database branching for any PostgreSQL setup.
๐ŸŒ
Blocks and Files
blocksandfiles.com โ€บ block โ€บ 2026 โ€บ 02 โ€บ 10 โ€บ simplyblock-provides-postgres-git-style-branching โ€บ 4090455
Simplyblock provides Postgres Git-style branching
February 12, 2026 - Fast cloud-native block storage provider Simplyblock has built its Vela software to provide instant Postgres database branches with no data copying and running on its block storage. Having created its Kubernetes-integrated block storage, the company has moved up stack to produce system application software that uses it.
๐ŸŒ
GitHub
github.com โ€บ postgres-ai โ€บ database-lab-engine
GitHub - postgres-ai/database-lab-engine: DBLab enables ๐Ÿ–– database branching and โšก๏ธ thin cloning for any Postgres database and empowers DB testing in CI/CD. This optimizes database-related costs while improving time-to-market and software quality. Follow to stay updated.
DBLab enables ๐Ÿ–– database branching and โšก๏ธ thin cloning for any Postgres database and empowers DB testing in CI/CD. This optimizes database-related costs while improving time-to-market and software quality. Follow to stay updated. - postgres-ai/database-lab-engine
Starred by 2.5K users
Forked by 72 users
Languages ย  Go 65.6% | TypeScript 29.6% | Shell 3.5% | SCSS 0.8% | HTML 0.2% | Makefile 0.2%
๐ŸŒ
Reddit
reddit.com โ€บ r/selfhosted โ€บ pgbranch - git-style branching for postgresql
r/selfhosted on Reddit: pgbranch - git-style branching for PostgreSQL
December 10, 2025 -

Built this over the past week to solve my own problem: switching git branches breaks my local PostgreSQL database.

The migrations from your feature branch are still applied, and sometimes you can't just roll them back - the feature schema isn't compatible with main, or you've modified data in ways that don't work with the old code, or you've deleted rows that the old branch expects to exist. Your options are drop and re-seed (slow), or maintain multiple databases and juggle connection strings (annoying).

What it does

Creates instant snapshots of your PostgreSQL database using template databases. Switch between database states like git branches:

pgbranch branch main # snapshot current state

pgbranch checkout main # restore to that state instantly

No pg_dump for local operations. Template databases are file-level copies - fast even for large databases.

Why I'm posting here

  • Single Go binary - no runtime dependencies beyond PostgreSQL's own tools (psql, createdb, dropdb)

  • No cloud required - everything runs locally, nothing phones home (unless you want to share with the team)

  • Filesystem remote support - share snapshots via NAS, network share, or mounted drive. No S3 needed.

  • Simple config - single .pgbranch.json file, no separate database for the tool

Cloud remotes (S3, R2) are supported if you want them.

What it doesn't do

  • Production use - this is for local development only

  • Incremental backups - each snapshot is a full copy

  • It's a week old - works for my workflow but still early

Setup

go install github.com/le-vlad/pgbranch/cmd/pgbranch@latest

pgbranch init -d myapp_dev

pgbranch branch main

For sharing across machines:

pgbranch remote add nas /mnt/nas/pgbranch-snapshots

pgbranch push main

# on another machine

pgbranch pull main

GitHub: https://github.com/le-vlad/pgbranch

If you self-host PostgreSQL for development, I'd appreciate feedback. What's missing? What would make this useful for your setup?