@@ -2231,9 +2231,10 @@ static void MtmBroadcastUtilityStmt(char const* sql, bool ignoreError)
2231
2231
}
2232
2232
if (!MtmRunUtilityStmt (conns [i ],sql ,& utility_errmsg )&& !ignoreError )
2233
2233
{
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" ;
2237
2238
2238
2239
failedNode = i ;
2239
2240
break ;
@@ -2438,6 +2439,23 @@ static void MtmProcessUtility(Node *parsetree, const char *queryString,
2438
2439
skipCommand = stmt -> relation -> relpersistence == RELPERSISTENCE_TEMP ;
2439
2440
}
2440
2441
break ;
2442
+ case T_IndexStmt :
2443
+ {
2444
+ Oid relid ;
2445
+ Relation rel ;
2446
+ IndexStmt * stmt = (IndexStmt * )parsetree ;
2447
+ bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL );
2448
+
2449
+ if (stmt -> concurrent )
2450
+ PreventTransactionChain (isTopLevel ,
2451
+ "CREATE INDEX CONCURRENTLY" );
2452
+
2453
+ relid = RelnameGetRelid (stmt -> relation -> relname );
2454
+ rel = heap_open (relid ,ShareLock );
2455
+ skipCommand = rel -> rd_rel -> relpersistence == RELPERSISTENCE_TEMP ;
2456
+ heap_close (rel ,NoLock );
2457
+ }
2458
+ break ;
2441
2459
default :
2442
2460
skipCommand = false;
2443
2461
break ;