Tracking Primary key integer overflow risk for `ci_job_artifacts`
ci_job_artifacts
is a large table with a lot of records. It's primary key is an integer-typed sequence with results in a maximum number of 2,147,483,647 records with a positive primary key in this table.
The current maximum id is 1.26B - or about 58.89% of the overall available space:
# select current_date, max(id) as current_max, ((max(id) / 2147483647.0) * 100)::integer as percentage_used from ci_job_artifacts;
current_date | current_max | percentage_used
--------------+-------------+-----------------
2020-11-02 | 906759656 | 42.??
2021-02-19 | 1136044262 | 53.??
2021-03-19 | 1209766357 | 56.33
2021-04-10 | 1264625790 | 58.89
This issue is to track the state of this, provide estimates when the overflow is expected to happen and to discuss possible solutions to it.
According to our forecast on 2021-02-22 ci_job_artifacts
has the second fastest Primary Key with an integer value and it is expected to overflow between August 2021 (at a worst case scenario using an exponential forecast) and December 2021 (following a polynomial model).
Edited by Yannis Roussos