Skip to content

Commit 795e107

Browse files
committed
Say ANALYZE, not VACUUM, in error message on analyze in hot standby.
Tomonaru Katsumata
1 parent 6dea5f4 commit 795e107

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/backend/tcop/utility.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,10 +1018,14 @@ standard_ProcessUtility(Node *parsetree,
10181018
break;
10191019

10201020
case T_VacuumStmt:
1021-
/* we choose to allow this during "read only" transactions */
1022-
PreventCommandDuringRecovery("VACUUM");
1023-
vacuum((VacuumStmt *) parsetree, InvalidOid, true, NULL, false,
1024-
isTopLevel);
1021+
{
1022+
VacuumStmt *stmt = (VacuumStmt *) parsetree;
1023+
1024+
/* we choose to allow this during "read only" transactions */
1025+
PreventCommandDuringRecovery((stmt->options & VACOPT_VACUUM) ?
1026+
"VACUUM" : "ANALYZE");
1027+
vacuum(stmt, InvalidOid, true, NULL, false, isTopLevel);
1028+
}
10251029
break;
10261030

10271031
case T_ExplainStmt:

0 commit comments

Comments
 (0)