3 ms·
I'm obviously biased by being an employee, but this is where Neon's branching[0] functionality can come in useful. We hope to expand on it one day and build mor
by conradludgate 2y ago
I'm obviously biased by being an employee, but this is where Neon's branching[0] functionality can come in useful. We hope to expand on it one day and build more first-party migration tooling but you can already get a good enough system with the features we have.
Neon Branches are zero-copy snapshots of the database, with all the same data, on an isolated postgres instance. You can run migrations on that data without risking any modifications to data or performance in production. You can set up scripts to run it in CI[1].
This isn't perfect. If performance matters, some migrations might hide table locks which can cause major slowdowns. I'm not sure how you might detect this currently, I had some discussions recently about whether we can add "explain analyze" to DDL queries in postgres.
[0]: https://neon.tech/docs/introduction/branching https://neon.tech/docs/introduction/branching
[1]: https://neon.tech/docs/guides/branching-github-actions https://neon.tech/docs/guides/branching-github-actions
- davidgomes 2y ago> If performance matters, some migrations might hide table locks which can cause major slowdowns. Do you mean that the migration might work on a side branch, but then it might not work on the main branch, because there's no other activity running on the side branch?