TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

PostgreSQL: How to convert 2B rows to bigint

3 pointsby cbisnettalmost 5 years ago

1 comment

SigmundAalmost 5 years ago
One thing I really wish database would focus on is online schema changes and metadata only changes.<p>I know this is not an easy problem to solve, and there are a lot of performance reason say changing a 4 byte int to an 8 byte int requires a data migration rather than just a metadata change.<p>However I think with enough thought even that could be done and still be performant. Maybe a hit as a hidden secondary column is added and data slowly migrated to it then the old column finally removed.<p>Although maybe just going to variable length number storage would be better just like strings (varchar) then min and max values are just constraints not a storage issue.