1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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

Tomonaru Katsumata
This commit is contained in:
Heikki Linnakangas
2012-10-08 14:17:27 +03:00
parent bea34106a6
commit d09affdc48

View File

@ -1006,10 +1006,14 @@ standard_ProcessUtility(Node *parsetree,
break;
case T_VacuumStmt:
/* we choose to allow this during "read only" transactions */
PreventCommandDuringRecovery("VACUUM");
vacuum((VacuumStmt *) parsetree, InvalidOid, true, NULL, false,
isTopLevel);
{
VacuumStmt *stmt = (VacuumStmt *) parsetree;
/* we choose to allow this during "read only" transactions */
PreventCommandDuringRecovery((stmt->options & VACOPT_VACUUM) ?
"VACUUM" : "ANALYZE");
vacuum(stmt, InvalidOid, true, NULL, false, isTopLevel);
}
break;
case T_ExplainStmt: