aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-08 14:17:27 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-10-08 14:20:56 +0300
commit3c856708e56ceb7025066a800c95b7293e9bd3f5 (patch)
tree43006c7f3227d7eb56721bee5151f8afd1080098 /src
parent8ebe8889a8c5604b66802508b822cf18b8cd6820 (diff)
downloadpostgresql-3c856708e56ceb7025066a800c95b7293e9bd3f5.tar.gz
postgresql-3c856708e56ceb7025066a800c95b7293e9bd3f5.zip
Say ANALYZE, not VACUUM, in error message on analyze in hot standby.
Tomonaru Katsumata
Diffstat (limited to 'src')
-rw-r--r--src/backend/tcop/utility.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 0559998c71f..f45d92df73d 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: