Migration from MySQL to PostgreSQL doesn't change index names

Summary

Discovered issues when attempting to update instances that were on MySQL and migrated to PostgreSQL

https://docs.gitlab.com/ee/update/mysql_to_postgresql.html

https://gitlab.com/gitlab-org/gitlab-ee/issues/2799

Possible fixes

Import migrated schema and compare against (same version)

https://github.com/djrobstep/migra

migra --unsafe "postgresql:///gitlabtest?host=/var/opt/gitlab/postgresql" "postgresql:///gitlabhq_production?host=/var/opt/gitlab/postgresql"

Caveats/Gotchas

  • Some table data can trigger migrations in later versions where indexes/data has been removed during the migration.

  • Needed to add pg_trgm extension

CREATE EXTENSION pg_trgm;

Used for internal ZD: https://gitlab.zendesk.com/agent/tickets/92471

Edited Apr 16, 2018 by Davin Walker
Assignee Loading
Time tracking Loading