Resolve (programmatically) foreign table refresh race condition on Geo upgrade
Problem to solve
#32386 (closed) solves a race condition with documentation instructions. This issue intends to solve it without any effort by sysadmins.
Intended users
Further details
Proposal
See discussions below for multiple proposals.
Permissions and Security
Testing
What does success look like, and how can we measure that?
- Manually modify the latest migration on primary to do nothing on
down
and to onlysleep(30)
onup
- Primary:
sudo gitlab-rake db:rollback
- Secondary:
sudo rake geo:refresh_foreign_tables
- Primary:
sudo gitlab-rake db:migrate
on primary - Observe waiting for migrations to finish and be replicated
- Observe foreign tables being refreshed
What is the type of buyer?
- Premium
- Ultimate
Links / references
Edited by Michael Kozono