Pg_branch: Experimental Postgres extension brings Neon-like branching
GitStyle branching for local PostgreSQL
How are you managing isolated Postgres database branches for preview deployments /CI?
What is database branching?
Is database branching the same as database cloning?
When should teams use database branching instead of shared staging?
Videos
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.
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.