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
-
📋 Does this MR need a changelog?-
I have included a changelog entry.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
- [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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