We are upgrading the operating system on our Postgres database clusters
Aug 12, 2022David Smith6 min read
Database Migration Debugging and Cross-Database Compatibility#Postgres#Operating System Upgrade#index reindexing
Opens about.gitlab.comWhat the post covers
This post details the upgrade of the operating system on GitLab.com's Postgres database clusters from Ubuntu 16.04 to Ubuntu 20.04.
- The upgrade required a maintenance window due to glibc changes affecting Postgres indexes.
- The approach involved setting up new Ubuntu 20.04 clusters with streaming replication, promoting them during downtime, and reindexing potentially corrupt indexes.
- Performance improvements were made to the `amcheck` script for faster index corruption detection and to the reindexing process itself.
- Specific strategies were outlined for reindexing B-Tree, GiST, Hash, and GIN indexes.
More from the Database Migration Debugging and Cross-Database Compatibility trail
Decomposing the GitLab backend database, Part 3: Challenges and surprises
Decomposing the GitLab backend database, Part 1: Designing and planning
GitLab database decomposition: Final migration and results
We are splitting our database into Main and CI
Why we spent the last month eliminating PostgreSQL subtransactions