diff options
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c5a56c75f69..b987e023849 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -61,6 +61,7 @@ #include "utils/builtins.h" #include "utils/fmgroids.h" #include "utils/guc.h" +#include "utils/injection_point.h" #include "utils/inval.h" #include "utils/lsyscache.h" #include "utils/memutils.h" @@ -3782,8 +3783,16 @@ ReindexRelationConcurrently(const ReindexStmt *stmt, Oid relationOid, const Rein RestrictSearchPath(); /* determine safety of this index for set_indexsafe_procflags */ - idx->safe = (indexRel->rd_indexprs == NIL && - indexRel->rd_indpred == NIL); + idx->safe = (RelationGetIndexExpressions(indexRel) == NIL && + RelationGetIndexPredicate(indexRel) == NIL); + +#ifdef USE_INJECTION_POINTS + if (idx->safe) + INJECTION_POINT("reindex-conc-index-safe"); + else + INJECTION_POINT("reindex-conc-index-not-safe"); +#endif + idx->tableId = RelationGetRelid(heapRel); idx->amId = indexRel->rd_rel->relam; |