Skip to content

Drop duplicate index on ci_pipelines_config

What does this MR do and why?

This MR drops index_ci_pipelines_config_on_pipeline_id as it has been identified as a duplicated index.

We already have an index on the PK which is pipeline_id, this will free up 22GB.

gitlabhq_development_ci=# \d+ ci_pipelines_config
                                      Table "public.ci_pipelines_config"
    Column    |  Type  | Collation | Nullable | Default | Storage  | Compression | Stats target | Description
--------------+--------+-----------+----------+---------+----------+-------------+--------------+-------------
 pipeline_id  | bigint |           | not null |         | plain    |             |              |
 content      | text   |           | not null |         | extended |             |              |
 partition_id | bigint |           | not null |         | plain    |             |              |
Indexes:
    "ci_pipelines_config_pkey" PRIMARY KEY, btree (pipeline_id)
    "index_ci_pipelines_config_on_pipeline_id" btree (pipeline_id)
Foreign-key constraints:
    "fk_rails_906c9a2533" FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id) ON DELETE CASCADE
    "fk_rails_906c9a2533_tmp" FOREIGN KEY (pipeline_id) REFERENCES ci_pipelines(id_convert_to_bigint) ON DELETE CASCADE
Access method: heap
Edited by Max Orefice

Merge request reports