@@ -2230,9 +2230,10 @@ static void MtmBroadcastUtilityStmt(char const* sql, bool ignoreError)
22302230}
22312231if (!MtmRunUtilityStmt (conns [i ],sql ,& utility_errmsg )&& !ignoreError )
22322232{
2233- // errorMsg = "Failed to run command at node %d";
2234- // XXX: add check for our node
2235- errorMsg = utility_errmsg ;
2233+ if (i + 1 == MtmNodeId )
2234+ errorMsg = utility_errmsg ;
2235+ else
2236+ errorMsg = "Failed to run command at node %d" ;
22362237
22372238failedNode = i ;
22382239break ;
@@ -2433,6 +2434,27 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
24332434skipCommand = stmt -> relation -> relpersistence == RELPERSISTENCE_TEMP ;
24342435}
24352436break ;
2437+ case T_IndexStmt :
2438+ {
2439+ Oid relid ;
2440+ LOCKMODE lockmode ;
2441+ Relation rel ;
2442+
2443+ IndexStmt * stmt = (IndexStmt * )parsetree ;
2444+ lockmode = stmt -> concurrent ?ShareUpdateExclusiveLock
2445+ :ShareLock ;
2446+ relid = RangeVarGetRelidExtended (stmt -> relation ,lockmode ,
2447+ false, false,
2448+ NULL ,// ???
2449+ NULL );
2450+
2451+ rel = heap_open (relid ,lockmode );
2452+
2453+ skipCommand = rel -> rd_rel -> relpersistence == RELPERSISTENCE_TEMP ;
2454+
2455+ heap_close (rel ,NoLock );
2456+ }
2457+ break ;
24362458default :
24372459skipCommand = false;
24382460break ;