Skip to content

Remove index prior to creation

Andreas Brandl requested to merge ab-migration-helpers-concurrent-indexes into master

What does this MR do?

Concurrent index creation can fail and leave behind indexes marked as INVALID. When the migration is retried, it would look like the index existed already and we would skip its creation. However, an INVALID index does not recover on its own and is also not usable by queries.

Before we create an index (concurrently), we check if the index already exists and is in INVALID state. If it is, we remove it before we attempt to create it again. We leave it untouched if it is not marked INVALID.

Does this MR meet the acceptance criteria?

Edited by Andreas Brandl

Merge request reports