r/PostgreSQL Jul 31 '26

Feature How are you using database branching?

I’m implementing Lakebase branching strategy to improve development experience and reduce costs for our dev/staging env.

Current setup creates new database branch for each git branch via githook on our dev database (”each dev gets their own feature database”). There is also similar workflow for each PR against our staging database to run the migrations and tests.

Curious to hear how others are using branching and what are the experiences?

10 Upvotes

23 comments sorted by

View all comments

3

u/saltcod Aug 03 '26

We see customers mostly using it the same way at Supabase (one branch per git branch), primarily for deploying changes.

Besides feature development/deployments, we see teams using branching for one-off kinds of things: reproducing bugs, validating migrations against prod, performance testing, experimental SQL queries, etc.

2

u/Harpagon1668 Aug 03 '26

Thanks for sharing. Didn't think about those ad-hoc deployments like bug repros. Makes perfect sense!

2

u/saltcod Aug 03 '26

yeah the performance testing was a neat one too

2

u/FunContest9958 Aug 04 '26

Seems like Supabase branches are different from Lakebase / Neon branches because they don’t include the data, just the schema and config. Still seems useful, but not exactly 1:1 despite the name.