We are upgrading the operating system on our Postgres database clusters
Aug 12, 2022David Smith

Summary
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
- Seamlessly migrate from Jira to GitLab with Jira2Lab at scale
- Decomposing the GitLab backend database, Part 1: Designing and planning
- GitLab database decomposition: Final migration and results
- Decomposing the GitLab backend database, Part 3: Challenges and surprises
- Upgrade your external PostgreSQL 12 & 13 servers now