Skip to content

Draft: Add a migration that will backfill ci_pending_builds / tag_ids

Grzegorz Bizon requested to merge feature/gb/migrate-pending-builds-tag-ids into master

What does this MR do?

This merge request adds a migration that backfills tag_ids column in ci_pending_builds table to make it possible to rollout taggings denormalization sooner.

Database

Background Migration Details

X items to update
batch size = 1000
x / 1000 = Y batches

Estimated times per batch:
- x ms for select statement with 1000 items (see linked explain plan)
- x ms for update statement with 1000 items (see linked explain plan)
Total: ~x sec per batch

x batches = y mins to run this migration

Plan: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/6198/commands/20944

Conformity

Issues / epics

Epic: &5909 (closed)

/cc @morefice @mbobin

Edited by Grzegorz Bizon

Merge request reports