Skip to content

Commit b28cc92

Browse files
committed
Say ANALYZE, not VACUUM, in error message on analyze in hot standby.
Tomonaru Katsumata
1 parent 9c0e2b9 commit b28cc92

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
@@ -1123,10 +1123,14 @@ standard_ProcessUtility(Node *parsetree,
11231123
break;
11241124

11251125
case T_VacuumStmt:
1126-
/* we choose to allow this during "read only" transactions */
1127-
PreventCommandDuringRecovery("VACUUM");
1128-
vacuum((VacuumStmt *) parsetree, InvalidOid, true, NULL, false,
1129-
isTopLevel);
1126+
{
1127+
VacuumStmt *stmt = (VacuumStmt *) parsetree;
1128+
1129+
/* we choose to allow this during "read only" transactions */
1130+
PreventCommandDuringRecovery((stmt->options & VACOPT_VACUUM) ?
1131+
"VACUUM" : "ANALYZE");
1132+
vacuum(stmt, InvalidOid, true, NULL, false, isTopLevel);
1133+
}
11301134
break;
11311135

11321136
case T_ExplainStmt:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy