/plushcap/analysis/cockroach-labs/alter-column-types-without-taking-tables-offline

Alter Column Types Without Taking Tables Offline

What's this blog post about?

CockroachDB has introduced the ability to alter primary keys while in production without downtime. This feature allows developers to change the type of a column (alter column type) without taking tables offline, making it easier to manage database schema changes and evolving requirements. The implementation closely follows a manual process but automates the steps involved. Challenges faced during this implementation include handling two-version invariant object descriptors for reading and writing data. Currently, alter column type only works on columns that are not indexed or constrained, with plans to support more complex schema changes in the future.

Company
Cockroach Labs

Date published
Aug. 20, 2020

Author(s)
Richard Cai

Word count
1740

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.