From: Heikki Linnakangas Date: Mon, 8 Oct 2012 11:17:27 +0000 (+0300) Subject: Say ANALYZE, not VACUUM, in error message on analyze in hot standby. X-Git-Tag: REL9_1_7~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3c856708e56ceb7025066a800c95b7293e9bd3f5;p=postgresql Say ANALYZE, not VACUUM, in error message on analyze in hot standby. Tomonaru Katsumata --- diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 0559998c71..f45d92df73 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1071,10 +1071,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: