/plushcap/analysis/buildkite/avoiding-integer-overflows-with-zero-downtime

Avoiding integer overflows with zero downtime

What's this blog post about?

Buildkite, a Rails majestic monolith with a large PostgreSQL database, recently migrated one of its biggest tables from integer to bigint primary keys to prevent potential integer overflows. The migration process involved adding a new column with the bigger data type, backfilling the new column for existing records, and swapping the columns. ActiveRecord migrations were used for all database changes, ensuring zero-downtime throughout the entire process. Foreign key tables were also updated using similar strategies.

Company
Buildkite

Date published
March 25, 2021

Author(s)
Samuel Cochran

Word count
1004

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.