Add task to check decomposed table counts
What does this MR do and why?
Adds a task to show tables that should have zero rows if decomposed.
We may incorporate this into gdk doctor
, but I think this is also suitable to run for production as well
Related issue: gitlab-development-kit#1640 (closed)
Database queries
This runs a COUNT WITH LIMIT, such as:
-
SELECT COUNT(*) FROM (SELECT * FROM ci_builds LIMIT 1) AS count
https://console.postgres.ai/gitlab/gitlab-production-ci/sessions/17100/commands/57792
Screenshots or screen recordings
How to set up and validate locally
- Run
bundle exec rake gitlab:db:decomposition:check_decomposed_tables
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Thong Kuah