diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index fde2c82..bd907fe 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1124,7 +1124,10 @@ standard_ProcessUtility(Node *parsetree, case T_VacuumStmt: /* we choose to allow this during "read only" transactions */ - PreventCommandDuringRecovery("VACUUM"); + if (((VacuumStmt *) parsetree)->options & VACOPT_VACUUM) + PreventCommandDuringRecovery("VACUUM"); + else + PreventCommandDuringRecovery("ANALYZE"); vacuum((VacuumStmt *) parsetree, InvalidOid, true, NULL, false, isTopLevel); break;