Update all id columns in license-db
Problem to solve
As a follow-up to https://gitlab.com/gitlab-org/gitlab/-/issues/439227+ it's necessary to update all id columns in the schema to bigint
. npm
issues showed up first b/c of the volume of traffic, but other package registries will be affected at some point.
max(id)
values of tables in licensedb
(as of 2024-01-26
)
Query:
max(id)
values of tables in licensedb
(as of 2024-01-26
)select 'maven_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from maven_component_id_seq), '999,999,999,999,999') as last_val from maven_component
union
select 'maven_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from maven_license_id_seq), '999,999,999,999,999') as last_seq_val from maven_license
union
select 'license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from license_id_seq), '999,999,999,999,999') as last_seq_val from license
union
select 'registry_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from registry_id_seq), '999,999,999,999,999') as last_seq_val from registry
union
select 'npm_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from npm_component_id_seq), '999,999,999,999,999') as last_seq_val from npm_component
union
select 'pypi_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from pypi_component_id_seq), '999,999,999,999,999') as last_seq_val from pypi_component
union
select 'rubygem_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from rubygem_component_id_seq), '999,999,999,999,999') as last_seq_val from rubygem_component
union
select 'pypi_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from pypi_license_id_seq), '999,999,999,999,999') as last_seq_val from pypi_license
union
select 'rubygem_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from rubygem_license_id_seq), '999,999,999,999,999') as last_seq_val from rubygem_license
union
select 'go_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from go_component_id_seq), '999,999,999,999,999') as last_seq_val from go_component
union
select 'go_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from go_license_id_seq), '999,999,999,999,999') as last_seq_val from go_license
union
select 'conan_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from conan_component_id_seq), '999,999,999,999,999') as last_seq_val from conan_component
union
select 'conan_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from conan_license_id_seq), '999,999,999,999,999') as last_seq_val from conan_license
union
select 'trivy_db_advisory_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from trivy_db_advisory_id_seq), '999,999,999,999,999') as last_seq_val from trivy_db_advisory
union
select 'trivy_db_package_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from trivy_db_package_id_seq), '999,999,999,999,999') as last_seq_val from trivy_db_package
union
select 'nuget_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from nuget_component_id_seq), '999,999,999,999,999') as last_seq_val from nuget_component
union
select 'nuget_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from nuget_license_id_seq), '999,999,999,999,999') as last_seq_val from nuget_license
union
select 'packagist_component_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from packagist_component_id_seq), '999,999,999,999,999') as last_seq_val from packagist_component
union
select 'packagist_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from packagist_license_id_seq), '999,999,999,999,999') as last_seq_val from packagist_license
union
select 'npm_license_max_id' as name, to_char(max(id), '999,999,999,999,999') as max_id, to_char((select last_value from npm_license_id_seq), '999,999,999,999,999') as last_seq_val from npm_license;
Result:
name | max_id | last_val
----------------------------+----------------------+----------------------
registry_max_id | 8 | 8
trivy_db_advisory_max_id | 1,260,333 | 1,260,776
go_component_max_id | 57,211,254 | 57,211,254
packagist_license_max_id | 1,188,973,139 | 1,188,974,356
nuget_component_max_id | 5,119,202 | 5,119,391
conan_license_max_id | 1,731,886 | 1,732,003
license_max_id | 927 | 944
rubygem_license_max_id | 1,071,513,669 | 1,071,522,165
nuget_license_max_id | 296,911,424 | 296,911,424
pypi_component_max_id | 13,410,990 | 13,411,447
npm_license_max_id | 2,077,045,093 | 2,176,350,038
conan_component_max_id | 561,333 | 562,500
packagist_component_max_id | 102,692,036 | 102,698,167
maven_component_max_id | 83,487,484 | 83,489,564
pypi_license_max_id | 244,011,142 | 244,011,149
go_license_max_id | 61,610,326 | 61,610,326
npm_component_max_id | 164,872,214 | 196,641,263
maven_license_max_id | 112,218,148 | 112,218,148
trivy_db_package_max_id | 1,051,906 | 1,051,910
rubygem_component_max_id | 66,599,134 | 66,599,238
(20 rows)
Proposal
Update id columns in the <package_registry>_component
tables and foreign keys referencing them to bigint
.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.