Truncate production geo_event_log table
C4
Production Change - Criticality 4Change Objective | Bring geo_event_log table size down to a point where the pruning job can succeed |
---|---|
Change Type | Database |
Services Impacted | Postgres, Geo |
Change Team Members | @devin @ashmckenzie @mkozono @toon @abrandl |
Change Severity | Not urgent, but Unblocks DR setup |
Buddy check or tested in staging | A colleague will review the change, it is not practical to test, since there is no Geo on Staging |
Schedule of the change | TBD |
Duration of the change | 30 Minutes |
Detailed steps for the change:
pre-conditions
Verify the problem by running on console server (should error with statement timeout):
sudo gitlab-rake geo:status
-
Open database console in gprd
to run SQL commands below
execution commands
TRUNCATE geo_event_log RESTART IDENTITY RESTRICT;
post-execution validation
SELECT COUNT(*) FROM "geo_event_log"
Should return 0
Verify problem solved by running from console server (should succeed):
sudo gitlab-rake geo:status
rollback
Rollback should not be necessary, as Geo is not currently running. This is to prepare a clean start for Geo replication.
Edited by Devin Sylva