Draft: Add a migration that will backfill ci_pending_builds / tag_ids
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
-
I have added information for database reviewers in the MR description. -
I have self-reviewed this MR per code review guidelines.
Issues / epics
Epic: &5909 (closed)
Edited by Grzegorz Bizon