Skip to content

Add organization_id to ldap_admin_role_links

What does this MR do and why?

This change adds an organization_id sharding key to the ldap_admin_role_links table. We currently have 0 rows in production.

select * from ldap_admin_role_links;
 Seq Scan on public.ldap_admin_role_links  (cost=0.00..0.00 rows=1 width=186) (actual time=0.004..0.005 rows=0 loops=1)
   I/O Timings: read=0.000 write=0.000
Settings: effective_cache_size = '472585MB', jit = 'off', random_page_cost = '1.5', seq_page_cost = '4', work_mem = '100MB'

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/44347/commands/135960

update ldap_admin_role_links set organization_id = 1 where organization_id IS NULL;
Time: 0.487 ms
  - planning: 0.410 ms
  - execution: 0.077 ms
    - I/O read: 0.000 ms
    - I/O write: 0.000 ms

Shared buffers:
  - hits: 0 from the buffer pool
  - reads: 0 from the OS file cache, including disk I/O
  - dirtied: 0
  - writes: 0

https://console.postgres.ai/gitlab/gitlab-production-main/sessions/44605/commands/136861

References

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by mo khan

Merge request reports

Loading