Skip to content
Permalink
Browse files
HAWQ-377. Reindex should not be dispatched to segments.
  • Loading branch information
ztao1987 committed Feb 1, 2016
1 parent a98b493 commit ee7d00482f357ee9a07f68bd4aaca9e2a2052b9a
Showing 1 changed file with 0 additions and 26 deletions.
@@ -1714,32 +1714,6 @@ ProcessUtility(Node *parsetree,
(int) stmt->kind);
break;
}

if (Gp_role == GP_ROLE_DISPATCH)
{
if (stmt->kind != OBJECT_DATABASE)
dispatch_statement_node((Node *) stmt, NULL, NULL, NULL);
else
{
/*
* REINDEX DATABASE must be dispatched different, because it can't
* be in a user transaction
*/
StringInfoData buffer;

initStringInfo(&buffer);

/* MPP-1832: REINDEX SYSTEM generates sets
* kind to OBJECT_DATABASE, but sets do_user
* to false */
if (!stmt->do_user)
appendStringInfo(&buffer, "REINDEX SYSTEM \"%s\"", stmt->name);
else
appendStringInfo(&buffer, "REINDEX DATABASE \"%s\"", stmt->name);

dispatch_statement_string(buffer.data, NULL, 0, NULL, NULL, false);
}
}
}
break;

0 comments on commit ee7d004

Please sign in to comment.