RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

PG zero-downtime migration from int to bigint (with Ruby on Rails notes)

If you have an integer column you must migrate to a bigint column and you can’t afford downtime (or you’re interested in how that can be done) this blog post gives the recipe.

https://engineering.silverfin.com/pg-zero-downtime-bigint-migration/

Comments

This is very cool! I like the use of triggers.

I built a similar tool called pg-osc (pg-online-schema-change) that does this out of the box (but slightly different approach). If you find yourself using, I’d love to hear your thoughts :) https://github.com/shayonj/pg-osc. Cheers!

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in