DEV Community

Cover image for What PostgreSQL migration made you nervous, furious, or surprised you in production?
D_SECURITY
D_SECURITY

Posted on

What PostgreSQL migration made you nervous, furious, or surprised you in production?

I'm working on an open-source PostgreSQL migration analyzer called safe-migrate, and I've realized that the test cases I can invent are much neater than production.

I'm looking for counterexamples: migrations that seemed routine, then behaved very differently on a real database. I don't want to make up edge cases from a desk and declare them "covered."

Things I'd especially like to learn about:

  • a migration that was fine in staging and bad in production
  • a lock, rewrite, dependency, partition, trigger, policy, or function surprise
  • a migration that looked safe but was not
  • a migration tool warning that turned out to be wrong or useless
  • an ordering problem across multiple migration files

If you remember them, the useful details are the PostgreSQL version, a simplified or sanitized version of the SQL (or migration sequence), rough table size or traffic, and what you expected versus what happened.

Please do not post anything confidential. Sanitized SQL or just a description is genuinely useful. If an example looks suitable for public regression coverage, I'll ask before turning a minimized version into a fixture.

I'm not asking anyone to install the project. I mainly want to find its blind spots. If you share something, I'll share what I think is happening and please correct me if I'm wrong.

Repo: Safe-migrate

Top comments (0)