diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-10-08 14:17:27 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2012-10-08 14:20:39 +0300 |
commit | 795e10749f1e2e0132cb236b4fe3143cf53b0825 (patch) | |
tree | f0b989a5a5a37a6056dede0f7333b5e553a3830b /src/backend/tcop/utility.c | |
parent | 6dea5f4c4e1fcb5b5b0fea9a0e3a06f5f5def41c (diff) |
Say ANALYZE, not VACUUM, in error message on analyze in hot standby.
Tomonaru Katsumata
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r-- | src/backend/tcop/utility.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 7f36a09f46d..3b0ebdd3e75 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1018,10 +1018,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: |