Adjust reindexing strategy
What does this MR do?
This is a strategy change for how we select indexes for reindexing. This is currently enabled on GitLab.com and aims to reduce index bloat levels. For a summary of the current state and how reindexing helped with that, please see:
The strategy changes here are:
- Consider relative bloat levels instead of absolute bloat
- Exclude GIN indexes (risk for GitLab.com)
- Exclude indexes with relative bloat level < 20%
- Exclude indexes < 1 GB ondisk size (not worth it for now)
- Exclude indexes > 100 GB ondisk size (risk for GitLab.com)
- Don't reindex an index twice within 10 days
Together with adding support for unique indexes in!64695, this aims to distribute reindexing actions better across indexes and exclude the risky ones.
Relates to:
Related discussion in :
- gitlab-com/gl-infra/production#5069 (closed) (comment 618889225)
Does this MR meet the acceptance criteria?
Conformity
-
I have included changelog trailers, or none are needed. (Does this MR need a changelog?) -
I have added information for database reviewers in the MR description, or it's not needed. (Does this MR have database related changes?) -
I have self-reviewed this MR per code review guidelines.
Edited by Andreas Brandl