aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/index.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index cecee93ad8e..6084dfa97cb 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -4010,6 +4010,14 @@ reindex_relation(const ReindexStmt *stmt, Oid relid, int flags,
errmsg("cannot reindex invalid index \"%s.%s\" on TOAST table, skipping",
get_namespace_name(indexNamespaceId),
get_rel_name(indexOid))));
+
+ /*
+ * Remove this invalid toast index from the reindex pending list,
+ * as it is skipped here due to the hard failure that would happen
+ * in reindex_index(), should we try to process it.
+ */
+ if (flags & REINDEX_REL_SUPPRESS_INDEX_USE)
+ RemoveReindexPending(indexOid);
continue;
}