Commit b28cc92d authored by Heikki Linnakangas's avatar Heikki Linnakangas

Say ANALYZE, not VACUUM, in error message on analyze in hot standby.

Tomonaru Katsumata
parent 9c0e2b91
...@@ -1123,10 +1123,14 @@ standard_ProcessUtility(Node *parsetree, ...@@ -1123,10 +1123,14 @@ standard_ProcessUtility(Node *parsetree,
break; break;
case T_VacuumStmt: case T_VacuumStmt:
{
VacuumStmt *stmt = (VacuumStmt *) parsetree;
/* we choose to allow this during "read only" transactions */ /* we choose to allow this during "read only" transactions */
PreventCommandDuringRecovery("VACUUM"); PreventCommandDuringRecovery((stmt->options & VACOPT_VACUUM) ?
vacuum((VacuumStmt *) parsetree, InvalidOid, true, NULL, false, "VACUUM" : "ANALYZE");
isTopLevel); vacuum(stmt, InvalidOid, true, NULL, false, isTopLevel);
}
break; break;
case T_ExplainStmt: case T_ExplainStmt:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment