Home / Companies / Cockroach Labs / Blog / Post Details
Content Deep Dive

Alter Column Types Without Taking Tables Offline

Blog post from Cockroach Labs

Post Details
Company
Date Published
Author
Richard Cai
Word Count
1,740
Company Posts That Month
6
Language
English
Hacker News Points
-
Post removed?
No
Summary

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.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.