diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index bd213461ef1..96592f1956e 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -17643,7 +17643,8 @@ ATSetTableSpaceCopyIndexes(AlterTableUtilityContext *context) { if (context == NULL || IsInTransactionBlock(context->isTopLevel)) return true; - if (EventCacheLookup(EVT_DDLCommandEnd) != NIL) + if (EventCacheLookup(EVT_DDLCommandEnd) != NIL || + EventCacheLookup(EVT_SQLDrop) != NIL) return true; MyXactFlags |= XACT_FLAGS_NEEDIMMEDIATECOMMIT;