Drop stale Pulp RBAC indexes on core_userrole and core_grouprole#2691
Open
amasolov wants to merge 1 commit intoansible:mainfrom
Open
Drop stale Pulp RBAC indexes on core_userrole and core_grouprole#2691amasolov wants to merge 1 commit intoansible:mainfrom
amasolov wants to merge 1 commit intoansible:mainfrom
Conversation
After Hub transitioned to DAB RBAC, the old Pulp RBAC assignment tables core_userrole and core_grouprole have zero rows and their non-PK/non-unique indexes have zero scans. These 10 indexes are dead weight that slows VACUUM and adds planner overhead. This migration drops 10 stale indexes on these tables via RunSQL. The tables themselves are left intact (owned by pulpcore). The migration is fully reversible. Signed-off-by: Artem Masolov <amasolov@redhat.com> Signed-off-by: Alexey Masolov <alexey.masolov@gmail.com> Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR doing:
Adds migration 0060 that drops 10 stale indexes on
core_userroleandcore_grouproletables. These tables have zero rows after the DAB RBAC transition, and their non-PK indexes have zero scans.The migration uses
RunSQLwithDROP INDEX IF EXISTSfor safety and is fully reversible. The tables themselves are left intact (owned by pulpcore).No-Issue
Reviewers must know:
core_userroleandcore_grouproleare owned by pulpcore but have zero rows post-DAB-RBAC migrationidx_scan = 0):core_userrole_content_type_id_a2ff8402core_userrole_domain_id_f78b1c11core_userrole_role_id_8272b20dcore_userrole_user_id_aca63c51core_userro_content_5c0477_idxcore_grouprole_content_type_id_a80c1cfccore_grouprole_domain_id_9644db4bcore_grouprole_group_id_09264d71core_grouprole_role_id_3c2c3564core_groupr_content_ea7d37_idxMade with Cursor