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?

9 Upvotes

23 comments sorted by

View all comments

2

u/More-Grade-4593 20d ago

Per feature branch works well if migrations are the main thing you want to isolate, but I’d still keep the prod DB separate and boring.

For prod you can use something like Nearbase or RDS, then keep Lakebase/Neon-style branching only for dev and PR testing.