Skip to content

Add FK from partitioned web_hook_logs to web_hooks (Part 3 of partitioned web_hook_logs migrations)

What does this MR do?

Related issue: #323676 (closed)

We have split !59190 (closed) to three MRs as there is considerable overhead to add each index to each partition of web_hook_logs. For more information and a full analysis, check !59190 (closed)

This is the third migration, in which we are adding a foreign key from the partitioned web_hook_logs (web_hook_logs_part_0c5294f417) to web_hooks.

We are also adding a new partitioning migration helper (add_concurrent_partitioned_foreign_key) that allows us to add foreign keys to partitioned tables with minimal locking and while overcoming PostgreSQL's restriction that does not allow adding NOT VALID foreign keys to partitioned tables.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Yannis Roussos

Merge request reports