Update large table NOT NULL constraint guide to verify records first
What does this MR do and why?
Updates the database guides for adding NOT NULL
constraints to large tables to align with the standard (small table) workflow.
The key change to the process is that we no longer add a NOT VALID
constraint right away. Instead, we wait for the background migration to complete before adding the constraint, so that we can verify there are no existing records that would violate it.
This will help to prevent incidents such as gitlab-com/gl-infra/production#17665 (closed).
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Related to #443864 (closed)