Open druzac opened 1 year ago
We could fix this at restore time by ignoring indices present in SnapshotInfoPB
that don't exist when handling a import_snapshot
request. We could try to fix this at backup time by ignoring indices that are invalid in export_snapshot
but that introduces issues if the validity of an index changes between ysqldump time and snapshot export time when doing a backup.
If we ignore indices we should ideally notify users somehow.
Jira Link: DB-4373
Description
Backups taken of a YSQL db with an index marked
invalid
in thepg_index
table can be corrupt. The issue is the sql dump produced does not include the index. However theSnapshotInfoPB
produced by theexport_snapshot
command does include metadata for the index. This results in a failed restore when using the backup and an error message like: