@@ -2231,9 +2231,10 @@ static void MtmBroadcastUtilityStmt(char const* sql, bool ignoreError)
22312231}
22322232if (!MtmRunUtilityStmt (conns [i ],sql ,& utility_errmsg )&& !ignoreError )
22332233{
2234- // errorMsg = "Failed to run command at node %d";
2235- // XXX: add check for our node
2236- errorMsg = utility_errmsg ;
2234+ if (i + 1 == MtmNodeId )
2235+ errorMsg = utility_errmsg ;
2236+ else
2237+ errorMsg = "Failed to run command at node %d" ;
22372238
22382239failedNode = i ;
22392240break ;
@@ -2438,6 +2439,27 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24382439skipCommand = stmt -> relation -> relpersistence == RELPERSISTENCE_TEMP ;
24392440}
24402441break ;
2442+ case T_IndexStmt :
2443+ {
2444+ Oid relid ;
2445+ LOCKMODE lockmode ;
2446+ Relation rel ;
2447+
2448+ IndexStmt * stmt = (IndexStmt * )parsetree ;
2449+ lockmode = stmt -> concurrent ?ShareUpdateExclusiveLock
2450+ :ShareLock ;
2451+ relid = RangeVarGetRelidExtended (stmt -> relation ,lockmode ,
2452+ false, false,
2453+ NULL ,// ???
2454+ NULL );
2455+
2456+ rel = heap_open (relid ,lockmode );
2457+
2458+ skipCommand = rel -> rd_rel -> relpersistence == RELPERSISTENCE_TEMP ;
2459+
2460+ heap_close (rel ,NoLock );
2461+ }
2462+ break ;
24412463default :
24422464skipCommand = false;
24432465break ;