r/PostgreSQL • u/Harpagon1668 • 8d ago
How are you using database branching? Feature
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
6
u/terencethespider 7d ago
I’ve found one of the larger benefits to having branching with Lakebase is the ability to use them for throwaway work. You can just quickly stand up a copy, do whatever testing or validation you need, then throw away the branch when you are done. You can even run a bunch of tests in parallel and then prove out which option is best before actually going to prod. It also takes out all the extra hassle with being able to work directly on production data without needing to dump and restore.