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:21:11 +0300 |
| commit | d09affdc480786dd38deae5fcdbf472fbe324117 (patch) | |
| tree | c7feb8d59491d644548b6afb9571da78bd33b117 /src | |
| parent | bea34106a6423eb2121f74b892c9020aa184919b (diff) | |
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.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index ec36644a492..c2d15a1728a 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -1006,10 +1006,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: |
