diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-03-06 06:10:59 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-03-06 06:10:59 +0000 |
commit | 92288a1cf9490be3835dc8524ee2ba407f1b885a (patch) | |
tree | c4fe79ee2cb5cb8fa3385580c6cf431a97c2fc48 /src/backend/commands | |
parent | 22ebad9e39e268c9d4c6c2e422af727058830089 (diff) | |
download | postgresql-92288a1cf9490be3835dc8524ee2ba407f1b885a.tar.gz postgresql-92288a1cf9490be3835dc8524ee2ba407f1b885a.zip |
Change made to elog:
o Change all current CVS messages of NOTICE to WARNING. We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.
o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.
o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.
o Remove INFO from the client_min_messages options and add NOTICE.
Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.
Regression passed.
Diffstat (limited to 'src/backend/commands')
-rw-r--r-- | src/backend/commands/_deadcode/recipe.c | 44 | ||||
-rw-r--r-- | src/backend/commands/analyze.c | 10 | ||||
-rw-r--r-- | src/backend/commands/async.c | 4 | ||||
-rw-r--r-- | src/backend/commands/command.c | 18 | ||||
-rw-r--r-- | src/backend/commands/copy.c | 4 | ||||
-rw-r--r-- | src/backend/commands/creatinh.c | 6 | ||||
-rw-r--r-- | src/backend/commands/dbcommands.c | 6 | ||||
-rw-r--r-- | src/backend/commands/define.c | 14 | ||||
-rw-r--r-- | src/backend/commands/explain.c | 8 | ||||
-rw-r--r-- | src/backend/commands/indexcmds.c | 8 | ||||
-rw-r--r-- | src/backend/commands/remove.c | 6 | ||||
-rw-r--r-- | src/backend/commands/sequence.c | 4 | ||||
-rw-r--r-- | src/backend/commands/trigger.c | 10 | ||||
-rw-r--r-- | src/backend/commands/user.c | 13 | ||||
-rw-r--r-- | src/backend/commands/vacuum.c | 36 | ||||
-rw-r--r-- | src/backend/commands/vacuumlazy.c | 8 | ||||
-rw-r--r-- | src/backend/commands/variable.c | 4 |
17 files changed, 101 insertions, 102 deletions
diff --git a/src/backend/commands/_deadcode/recipe.c b/src/backend/commands/_deadcode/recipe.c index 94c80ca0860..fba78820177 100644 --- a/src/backend/commands/_deadcode/recipe.c +++ b/src/backend/commands/_deadcode/recipe.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.15 2001/11/05 17:46:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.16 2002/03/06 06:09:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -39,7 +39,7 @@ extern CommandDest whereToSendOutput; void beginRecipe(RecipeStmt *stmt) { - elog(NOTICE, "You must compile with TIOGA defined in order to use recipes\n"); + elog(WARNING, "You must compile with TIOGA defined in order to use recipes\n"); } #else @@ -175,7 +175,7 @@ beginRecipe(RecipeStmt *stmt) e = r->eyes->val[i]; if (e->inNodes->num > 1) { - elog(NOTICE, + elog(WARNING, "beginRecipe: Currently eyes cannot have more than one input"); } if (e->inNodes->num == 0) @@ -185,7 +185,7 @@ beginRecipe(RecipeStmt *stmt) } #ifdef DEBUG_RECIPE - elog(NOTICE, "beginRecipe: eyes[%d] = %s\n", i, e->nodeName); + elog(WARNING, "beginRecipe: eyes[%d] = %s\n", i, e->nodeName); #endif /* DEBUG_RECIPE */ qList = tg_parseSubQuery(r, e->inNodes->val[0], teeInfo); @@ -237,7 +237,7 @@ beginRecipe(RecipeStmt *stmt) tplan = planner(teeInfo->val[t].tpi_parsetree); /* now add a tee node to the root of the plan */ - elog(NOTICE, "adding tee plan node to the root of the %s\n", + elog(WARNING, "adding tee plan node to the root of the %s\n", teeInfo->val[t].tpi_relName); newplan = (Tee *) makeNode(Tee); newplan->plan.targetlist = tplan->targetlist; @@ -285,7 +285,7 @@ beginRecipe(RecipeStmt *stmt) plan, attinfo, whereToSendOutput); - elog(NOTICE, "beginRecipe: cursor named %s is now available", portalName); + elog(WARNING, "beginRecipe: cursor named %s is now available", portalName); } } @@ -499,7 +499,7 @@ tg_replaceNumberedParam(Node *expression, } } else - elog(NOTICE, "tg_replaceNumberedParam: unexpected paramkind value of %d", p->paramkind); + elog(WARNING, "tg_replaceNumberedParam: unexpected paramkind value of %d", p->paramkind); } break; case T_Expr: @@ -624,7 +624,7 @@ tg_rewriteParamsInExpr(Node *expression, QueryTreeList * inputQlist) } } else - elog(NOTICE, "tg_rewriteParamsInExpr: unexpected paramkind value of %d", p->paramkind); + elog(WARNING, "tg_rewriteParamsInExpr: unexpected paramkind value of %d", p->paramkind); } break; case T_Expr: @@ -709,7 +709,7 @@ getParamTypes(TgElement * elem, Oid *typev) if (!OidIsValid(toid)) elog(ERROR, "getParamTypes: arg type '%s' is not defined", t); if (!defined) - elog(NOTICE, "getParamTypes: arg type '%s' is only a shell", t); + elog(WARNING, "getParamTypes: arg type '%s' is only a shell", t); } typev[parameterCount++] = toid; } @@ -834,7 +834,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) */ #ifdef DEBUG_RECIPE - elog(NOTICE, "calling parser with %s", elem->src); + elog(WARNING, "calling parser with %s", elem->src); #endif /* DEBUG_RECIPE */ parameterCount = getParamTypes(elem, typev); @@ -843,7 +843,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) if (qList->len > 1) { - elog(NOTICE, + elog(WARNING, "tg_parseSubQuery: parser produced > 1 query tree"); } } @@ -877,25 +877,25 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) snprintf(newquery, 1000, "select %s()", funcName); #ifdef DEBUG_RECIPE - elog(NOTICE, "calling parser with %s", newquery); + elog(WARNING, "calling parser with %s", newquery); #endif /* DEBUG_RECIPE */ qList = parser(newquery, typev, parameterCount); if (qList->len > 1) { - elog(NOTICE, + elog(WARNING, "tg_parseSubQuery: parser produced > 1 query tree"); } } break; case TG_RECIPE_GRAPH: - elog(NOTICE, "tg_parseSubQuery: can't parse recipe graph ingredients yet!"); + elog(WARNING, "tg_parseSubQuery: can't parse recipe graph ingredients yet!"); break; case TG_COMPILED: - elog(NOTICE, "tg_parseSubQuery: can't parse compiled ingredients yet!"); + elog(WARNING, "tg_parseSubQuery: can't parse compiled ingredients yet!"); break; default: - elog(NOTICE, "tg_parseSubQuery: unknown srcLang: %d", elem->srcLang); + elog(WARNING, "tg_parseSubQuery: unknown srcLang: %d", elem->srcLang); } /* parse each of the subrecipes that are input to this node */ @@ -937,7 +937,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) * if we hit an eye, we need to stop and make what we have into a * subrecipe query block */ - elog(NOTICE, "tg_parseSubQuery: can't handle eye nodes yet"); + elog(WARNING, "tg_parseSubQuery: can't handle eye nodes yet"); } else if (n->nodeType == TG_TEE_NODE) { @@ -1031,7 +1031,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) "result", InvalidOid, -1, 0, false)) - elog(NOTICE, "tg_parseSubQuery: unexpected result from TupleDescInitEntry"); + elog(WARNING, "tg_parseSubQuery: unexpected result from TupleDescInitEntry"); else { relid = heap_create_with_catalog( @@ -1042,9 +1042,9 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) } } else if (n->nodeType == TG_RECIPE_NODE) - elog(NOTICE, "tg_parseSubQuery: can't handle embedded recipes yet!"); + elog(WARNING, "tg_parseSubQuery: can't handle embedded recipes yet!"); else - elog(NOTICE, "unknown nodeType: %d", n->nodeType); + elog(WARNING, "unknown nodeType: %d", n->nodeType); return qList; } @@ -1155,7 +1155,7 @@ appendTeeQuery(TeeInfo * teeInfo, QueryTreeList * q, char *teeNodeName) return; } } - elog(NOTICE, "appendTeeQuery: teeNodeName '%s' not found in teeInfo"); + elog(WARNING, "appendTeeQuery: teeNodeName '%s' not found in teeInfo"); } @@ -1301,7 +1301,7 @@ replaceTeeScans(Plan *plan, Query *parsetree, TeeInfo * teeInfo) tplan = teeInfo->val[i].tpi_plan; } if (tplan == NULL) - elog(NOTICE, "replaceTeeScans didn't find the corresponding tee plan"); + elog(WARNING, "replaceTeeScans didn't find the corresponding tee plan"); /* * replace the sequential scan node with that var number with diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index e26d66229a9..d033fa95054 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.27 2002/03/02 21:39:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.28 2002/03/06 06:09:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -153,7 +153,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) elevel = INFO; else elevel = DEBUG1; - + /* * Begin a transaction for analyzing this relation. * @@ -165,7 +165,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) /* * Check for user-requested abort. Note we want this to be inside a - * transaction, so xact.c doesn't issue useless NOTICE. + * transaction, so xact.c doesn't issue useless WARNING. */ CHECK_FOR_INTERRUPTS(); @@ -204,9 +204,9 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) RELNAME) || (is_dbadmin(MyDatabaseId) && !onerel->rd_rel->relisshared))) { - /* No need for a notice if we already complained during VACUUM */ + /* No need for a WARNING if we already complained during VACUUM */ if (!vacstmt->vacuum) - elog(NOTICE, "Skipping \"%s\" --- only table or database owner can ANALYZE it", + elog(WARNING, "Skipping \"%s\" --- only table or database owner can ANALYZE it", RelationGetRelationName(onerel)); heap_close(onerel, NoLock); CommitTransactionCommand(); diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c index 6a0d80af2fa..cbfe37f027a 100644 --- a/src/backend/commands/async.c +++ b/src/backend/commands/async.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.82 2002/03/02 21:39:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.83 2002/03/06 06:09:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -221,7 +221,7 @@ Async_Listen(char *relname, int pid) if (alreadyListener) { heap_close(lRel, AccessExclusiveLock); - elog(NOTICE, "Async_Listen: We are already listening on %s", relname); + elog(WARNING, "Async_Listen: We are already listening on %s", relname); return; } diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index e49c8ca3212..4a2edd61bc0 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.158 2002/03/05 05:33:08 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.159 2002/03/06 06:09:29 momjian Exp $ * * NOTES * The PerformAddAttribute() code, like most of the relation @@ -126,7 +126,7 @@ PerformPortalFetch(char *name, */ if (name == NULL) { - elog(NOTICE, "PerformPortalFetch: missing portal name"); + elog(WARNING, "PerformPortalFetch: missing portal name"); return; } @@ -136,7 +136,7 @@ PerformPortalFetch(char *name, portal = GetPortalByName(name); if (!PortalIsValid(portal)) { - elog(NOTICE, "PerformPortalFetch: portal \"%s\" not found", + elog(WARNING, "PerformPortalFetch: portal \"%s\" not found", name); return; } @@ -253,7 +253,7 @@ PerformPortalClose(char *name, CommandDest dest) */ if (name == NULL) { - elog(NOTICE, "PerformPortalClose: missing portal name"); + elog(WARNING, "PerformPortalClose: missing portal name"); return; } @@ -263,7 +263,7 @@ PerformPortalClose(char *name, CommandDest dest) portal = GetPortalByName(name); if (!PortalIsValid(portal)) { - elog(NOTICE, "PerformPortalClose: portal \"%s\" not found", + elog(WARNING, "PerformPortalClose: portal \"%s\" not found", name); return; } @@ -749,7 +749,7 @@ AlterTableAlterColumnFlags(const char *relationName, myrelid = RelationGetRelid(rel); heap_close(rel, NoLock); /* close rel, but keep lock! */ - + /* * Check the supplied parameters before anything else */ @@ -759,7 +759,7 @@ AlterTableAlterColumnFlags(const char *relationName, { Assert(IsA(flagValue, Integer)); newtarget = intVal(flagValue); - + /* * Limit target to sane range (should we raise an error instead?) */ @@ -773,7 +773,7 @@ AlterTableAlterColumnFlags(const char *relationName, */ { Assert(IsA(flagValue, Value)); - + storagemode = strVal(flagValue); if (strcasecmp(storagemode, "plain") == 0) newstorage = 'p'; @@ -1556,7 +1556,7 @@ AlterTableDropConstraint(const char *relationName, constrName); /* Otherwise if more than one constraint deleted, notify */ else if (deleted > 1) - elog(INFO, "Multiple constraints dropped"); + elog(NOTICE, "Multiple constraints dropped"); } diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index ecc7232dc05..541f3d0a484 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.149 2002/02/27 01:34:41 ishii Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.150 2002/03/06 06:09:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1019,7 +1019,7 @@ CopyReadNewline(FILE *fp, int *newline) { if (!*newline) { - elog(NOTICE, "CopyReadNewline: extra fields ignored"); + elog(WARNING, "CopyReadNewline: extra fields ignored"); while (!CopyGetEof(fp) && (CopyGetChar(fp) != '\n')); } *newline = 0; diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 468434ea2a5..27535429c39 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.82 2002/03/02 21:39:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.83 2002/03/06 06:09:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -425,7 +425,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, * Yes, try to merge the two column definitions. They must * have the same type and typmod. */ - elog(INFO, "CREATE TABLE: merging multiple inherited definitions of attribute \"%s\"", + elog(NOTICE, "CREATE TABLE: merging multiple inherited definitions of attribute \"%s\"", attributeName); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (strcmp(def->typename->name, attributeType) != 0 || @@ -564,7 +564,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, * Yes, try to merge the two column definitions. They must * have the same type and typmod. */ - elog(INFO, "CREATE TABLE: merging attribute \"%s\" with inherited definition", + elog(NOTICE, "CREATE TABLE: merging attribute \"%s\" with inherited definition", attributeName); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (strcmp(def->typename->name, attributeType) != 0 || diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 3de94de9c6e..9d40d6a11e3 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.84 2002/03/01 22:45:08 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.85 2002/03/06 06:09:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -689,7 +689,7 @@ remove_dbdirs(const char *nominal_loc, const char *alt_loc) /* remove symlink */ if (unlink(nominal_loc) != 0) { - elog(NOTICE, "could not remove '%s': %m", nominal_loc); + elog(WARNING, "could not remove '%s': %m", nominal_loc); success = false; } } @@ -698,7 +698,7 @@ remove_dbdirs(const char *nominal_loc, const char *alt_loc) if (system(buf) != 0) { - elog(NOTICE, "database directory '%s' could not be removed", + elog(WARNING, "database directory '%s' could not be removed", target_dir); success = false; } diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 810c9bf1b43..841fc73c309 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.66 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.67 2002/03/06 06:09:32 momjian Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -154,7 +154,7 @@ compute_full_attributes(List *parameters, else if (strcasecmp(param->defname, "outin_ratio") == 0) *outin_ratio_p = (int) defGetNumeric(param); else - elog(NOTICE, "Unrecognized function attribute '%s' ignored", + elog(WARNING, "Unrecognized function attribute '%s' ignored", param->defname); } } @@ -348,12 +348,12 @@ DefineOperator(char *oprName, else if (strcasecmp(defel->defname, "precedence") == 0) { /* NOT IMPLEMENTED (never worked in v4.2) */ - elog(INFO, "CREATE OPERATOR: precedence not implemented"); + elog(NOTICE, "CREATE OPERATOR: precedence not implemented"); } else if (strcasecmp(defel->defname, "associativity") == 0) { /* NOT IMPLEMENTED (never worked in v4.2) */ - elog(INFO, "CREATE OPERATOR: associativity not implemented"); + elog(NOTICE, "CREATE OPERATOR: associativity not implemented"); } else if (strcasecmp(defel->defname, "commutator") == 0) commutatorName = defGetString(defel); @@ -379,7 +379,7 @@ DefineOperator(char *oprName, sortName2 = defGetString(defel); else { - elog(NOTICE, "DefineOperator: attribute \"%s\" not recognized", + elog(WARNING, "DefineOperator: attribute \"%s\" not recognized", defel->defname); } } @@ -450,7 +450,7 @@ DefineAggregate(char *aggName, List *parameters) else if (strcasecmp(defel->defname, "initcond1") == 0) initval = defGetString(defel); else - elog(NOTICE, "DefineAggregate: attribute \"%s\" not recognized", + elog(WARNING, "DefineAggregate: attribute \"%s\" not recognized", defel->defname); } @@ -578,7 +578,7 @@ DefineType(char *typeName, List *parameters) } else { - elog(NOTICE, "DefineType: attribute \"%s\" not recognized", + elog(WARNING, "DefineType: attribute \"%s\" not recognized", defel->defname); } } diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index faea169a636..319a9c83d82 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -5,7 +5,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994-5, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.69 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.70 2002/03/06 06:09:33 momjian Exp $ * */ @@ -51,7 +51,7 @@ ExplainQuery(Query *query, bool verbose, bool analyze, CommandDest dest) /* rewriter and planner may not work in aborted state? */ if (IsAbortedTransactionBlockState()) { - elog(NOTICE, "(transaction aborted): %s", + elog(WARNING, "(transaction aborted): %s", "queries ignored until END"); return; } @@ -59,7 +59,7 @@ ExplainQuery(Query *query, bool verbose, bool analyze, CommandDest dest) /* rewriter will not cope with utility statements */ if (query->commandType == CMD_UTILITY) { - elog(INFO, "Utility statements have no plan structure"); + elog(NOTICE, "Utility statements have no plan structure"); return; } @@ -69,7 +69,7 @@ ExplainQuery(Query *query, bool verbose, bool analyze, CommandDest dest) /* In the case of an INSTEAD NOTHING, tell at least that */ if (rewritten == NIL) { - elog(INFO, "Query rewrites to nothing"); + elog(NOTICE, "Query rewrites to nothing"); return; } diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 4aa14844358..b04ec8a9b41 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.62 2002/01/03 23:19:36 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.63 2002/03/06 06:09:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -556,7 +556,7 @@ ReindexIndex(const char *name, bool force /* currently unused */ ) if (IsIgnoringSystemIndexes()) overwrite = true; if (!reindex_index(tuple->t_data->t_oid, force, overwrite)) - elog(NOTICE, "index \"%s\" wasn't reindexed", name); + elog(WARNING, "index \"%s\" wasn't reindexed", name); ReleaseSysCache(tuple); } @@ -593,7 +593,7 @@ ReindexTable(const char *name, bool force) name, ((Form_pg_class) GETSTRUCT(tuple))->relkind); if (!reindex_relation(tuple->t_data->t_oid, force)) - elog(NOTICE, "table \"%s\" wasn't reindexed", name); + elog(WARNING, "table \"%s\" wasn't reindexed", name); ReleaseSysCache(tuple); } @@ -688,7 +688,7 @@ ReindexDatabase(const char *dbname, bool force, bool all) { StartTransactionCommand(); if (reindex_relation(relids[i], force)) - elog(NOTICE, "relation %u was reindexed", relids[i]); + elog(WARNING, "relation %u was reindexed", relids[i]); CommitTransactionCommand(); } StartTransactionCommand(); diff --git a/src/backend/commands/remove.c b/src/backend/commands/remove.c index b8a1c92e145..a0456adeb93 100644 --- a/src/backend/commands/remove.c +++ b/src/backend/commands/remove.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.65 2001/11/05 17:46:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.66 2002/03/06 06:09:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -336,8 +336,8 @@ RemoveFunction(char *functionName, /* function name to be removed */ if (((Form_pg_proc) GETSTRUCT(tup))->prolang == INTERNALlanguageId) { - /* "Helpful" notice when removing a builtin function ... */ - elog(NOTICE, "Removing built-in function \"%s\"", functionName); + /* "Helpful" WARNING when removing a builtin function ... */ + elog(WARNING, "Removing built-in function \"%s\"", functionName); } /* Delete any comments associated with this function */ diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index 1552252626f..6b2161a2b17 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.69 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.70 2002/03/06 06:09:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -699,7 +699,7 @@ init_sequence(char *caller, char *name) elm->rel = seqrel; if (RelationGetRelid(seqrel) != elm->relid) { - elog(NOTICE, "%s.%s: sequence was re-created", + elog(WARNING, "%s.%s: sequence was re-created", name, caller); elm->relid = RelationGetRelid(seqrel); elm->cached = elm->last = elm->increment = 0; diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index d424c5eb05d..61a4eacbacc 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.103 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.104 2002/03/06 06:09:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -368,7 +368,7 @@ DropTrigger(DropTrigStmt *stmt) elog(ERROR, "DropTrigger: there is no trigger %s on relation %s", stmt->trigname, stmt->relname); if (tgfound > 1) - elog(INFO, "DropTrigger: found (and deleted) %d triggers %s on relation %s", + elog(NOTICE, "DropTrigger: found (and deleted) %d triggers %s on relation %s", tgfound, stmt->trigname, stmt->relname); /* @@ -489,7 +489,7 @@ RelationRemoveTriggers(Relation rel) stmt.relname = pstrdup(RelationGetRelationName(refrel)); heap_close(refrel, NoLock); - elog(INFO, "DROP TABLE implicitly drops referential integrity trigger from table \"%s\"", stmt.relname); + elog(NOTICE, "DROP TABLE implicitly drops referential integrity trigger from table \"%s\"", stmt.relname); DropTrigger(&stmt); @@ -1419,8 +1419,8 @@ deferredTriggerInvokeEvents(bool immediate_only) * deferred-to-end-of-transaction triggers, it could get annoying * to rescan all the deferred triggers at each command end. * To speed this up, we could remember the actual end of the queue at - * EndQuery and examine only events that are newer. On state changes - * we simply reset the saved position to the beginning of the queue + * EndQuery and examine only events that are newer. On state changes + * we simply reset the saved position to the beginning of the queue * and process all events once with the new states. */ diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 45351b7ad0e..3de55ad71c0 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.92 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.93 2002/03/06 06:09:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -547,7 +547,7 @@ AlterUser(AlterUserStmt *stmt) /* changes to the flat password file cannot be rolled back */ if (IsTransactionBlock() && password) - elog(INFO, "ALTER USER: password changes cannot be rolled back"); + elog(NOTICE, "ALTER USER: password changes cannot be rolled back"); /* * Scan the pg_shadow relation to be certain the user exists. Note we @@ -785,7 +785,7 @@ DropUser(DropUserStmt *stmt) elog(ERROR, "DROP USER: permission denied"); if (IsTransactionBlock()) - elog(INFO, "DROP USER cannot be rolled back completely"); + elog(NOTICE, "DROP USER cannot be rolled back completely"); /* * Scan the pg_shadow relation to find the usesysid of the user to be @@ -1212,12 +1212,11 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) if (!member(v, newlist)) newlist = lappend(newlist, v); else - /* * we silently assume here that this error will only come * up in a ALTER GROUP statement */ - elog(NOTICE, "%s: user \"%s\" is already in group \"%s\"", + elog(WARNING, "%s: user \"%s\" is already in group \"%s\"", tag, strVal(lfirst(item)), stmt->name); } @@ -1269,7 +1268,7 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) if (null) { if (!is_dropuser) - elog(NOTICE, "ALTER GROUP: group \"%s\" does not have any members", stmt->name); + elog(WARNING, "ALTER GROUP: group \"%s\" does not have any members", stmt->name); } else { @@ -1322,7 +1321,7 @@ AlterGroup(AlterGroupStmt *stmt, const char *tag) if (member(v, newlist)) newlist = LispRemove(v, newlist); else if (!is_dropuser) - elog(NOTICE, "ALTER GROUP: user \"%s\" is not in group \"%s\"", strVal(lfirst(item)), stmt->name); + elog(WARNING, "ALTER GROUP: user \"%s\" is not in group \"%s\"", strVal(lfirst(item)), stmt->name); } newarray = palloc(ARR_OVERHEAD(1) + length(newlist) * sizeof(int32)); diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index afcdac7fb56..6b94db10777 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.216 2002/03/03 17:47:54 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.217 2002/03/06 06:09:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -195,7 +195,7 @@ vacuum(VacuumStmt *vacstmt) elevel = INFO; else elevel = DEBUG1; - + /* * Create special memory context for cross-transaction storage. * @@ -386,7 +386,7 @@ getrels(Name VacRelP, const char *stmttype) if (rkind != RELKIND_RELATION) { - elog(NOTICE, "%s: can not process indexes, views or special system tables", + elog(WARNING, "%s: can not process indexes, views or special system tables", stmttype); continue; } @@ -410,7 +410,7 @@ getrels(Name VacRelP, const char *stmttype) heap_close(rel, AccessShareLock); if (vrl == NULL) - elog(NOTICE, "%s: table not found", stmttype); + elog(WARNING, "%s: table not found", stmttype); return vrl; } @@ -454,7 +454,7 @@ vacuum_set_xid_limits(VacuumStmt *vacstmt, bool sharedRel, */ if (TransactionIdFollows(limit, *oldestXmin)) { - elog(NOTICE, "oldest Xmin is far in the past --- close open transactions soon to avoid wraparound problems"); + elog(WARNING, "oldest Xmin is far in the past --- close open transactions soon to avoid wraparound problems"); limit = *oldestXmin; } @@ -645,7 +645,7 @@ vac_truncate_clog(TransactionId vacuumXID, TransactionId frozenXID) /* Give warning about impending wraparound problems */ age = (int32) (GetCurrentTransactionId() - frozenXID); if (age > (int32) ((MaxTransactionId >> 3) * 3)) - elog(NOTICE, "Some databases have not been vacuumed in %d transactions." + elog(WARNING, "Some databases have not been vacuumed in %d transactions." "\n\tBetter vacuum them within %d transactions," "\n\tor you may have a wraparound failure.", age, (int32) (MaxTransactionId >> 1) - age); @@ -684,7 +684,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt) /* * Check for user-requested abort. Note we want this to be inside a - * transaction, so xact.c doesn't issue useless NOTICE. + * transaction, so xact.c doesn't issue useless WARNING. */ CHECK_FOR_INTERRUPTS(); @@ -716,7 +716,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt) * owner, or the database owner (but in the latter case, only if it's * not a shared relation). pg_ownercheck includes the superuser case. * - * Note we choose to treat permissions failure as a NOTICE and keep + * Note we choose to treat permissions failure as a WARNING and keep * trying to vacuum the rest of the DB --- is this appropriate? */ onerel = heap_open(relid, lmode); @@ -725,7 +725,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt) RELNAME) || (is_dbadmin(MyDatabaseId) && !onerel->rd_rel->relisshared))) { - elog(NOTICE, "Skipping \"%s\" --- only table or database owner can VACUUM it", + elog(WARNING, "Skipping \"%s\" --- only table or database owner can VACUUM it", RelationGetRelationName(onerel)); heap_close(onerel, lmode); CommitTransactionCommand(); @@ -996,7 +996,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, if (PageIsNew(page)) { - elog(NOTICE, "Rel %s: Uninitialized page %u - fixing", + elog(WARNING, "Rel %s: Uninitialized page %u - fixing", relname, blkno); PageInit(page, BufferGetPageSize(buf), 0); vacpage->free = ((PageHeader) page)->pd_upper - ((PageHeader) page)->pd_lower; @@ -1110,7 +1110,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, * This should not happen, since we hold exclusive * lock on the relation; shouldn't we raise an error? */ - elog(NOTICE, "Rel %s: TID %u/%u: InsertTransactionInProgress %u - can't shrink relation", + elog(WARNING, "Rel %s: TID %u/%u: InsertTransactionInProgress %u - can't shrink relation", relname, blkno, offnum, tuple.t_data->t_xmin); do_shrinking = false; break; @@ -1120,7 +1120,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, * This should not happen, since we hold exclusive * lock on the relation; shouldn't we raise an error? */ - elog(NOTICE, "Rel %s: TID %u/%u: DeleteTransactionInProgress %u - can't shrink relation", + elog(WARNING, "Rel %s: TID %u/%u: DeleteTransactionInProgress %u - can't shrink relation", relname, blkno, offnum, tuple.t_data->t_xmax); do_shrinking = false; break; @@ -1138,7 +1138,7 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, */ if (!OidIsValid(tuple.t_data->t_oid) && onerel->rd_rel->relhasoids) - elog(NOTICE, "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d.", + elog(WARNING, "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d.", relname, blkno, offnum, (int) tupgone); if (tupgone) @@ -1601,7 +1601,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel, ReleaseBuffer(Cbuf); pfree(vtmove); vtmove = NULL; - elog(NOTICE, "Child itemid in update-chain marked as unused - can't continue repair_frag"); + elog(WARNING, "Child itemid in update-chain marked as unused - can't continue repair_frag"); break; } tp.t_datamcxt = NULL; @@ -1720,7 +1720,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel, (vtmove[i].vacpage->offsets_used)--; } num_vtmove = 0; - elog(NOTICE, "Too old parent tuple found - can't continue repair_frag"); + elog(WARNING, "Too old parent tuple found - can't continue repair_frag"); break; } #ifdef NOT_USED /* I'm not sure that this will wotk @@ -2155,7 +2155,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel, * status bits. This is not really necessary, but will save time for * future transactions examining these tuples. * - * XXX Notice that this code fails to clear HEAP_MOVED_OFF tuples from + * XXX WARNING that this code fails to clear HEAP_MOVED_OFF tuples from * pages that were move source pages but not move dest pages. One * also wonders whether it wouldn't be better to skip this step and * let the tuple status updates happen someplace that's not holding an @@ -2467,7 +2467,7 @@ scan_index(Relation indrel, double num_tuples) { if (stats->num_index_tuples > num_tuples || !vac_is_partial_index(indrel)) - elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%.0f) IS NOT THE SAME AS HEAP' (%.0f).\ + elog(WARNING, "Index %s: NUMBER OF INDEX' TUPLES (%.0f) IS NOT THE SAME AS HEAP' (%.0f).\ \n\tRecreate the index.", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples); @@ -2521,7 +2521,7 @@ vacuum_index(VacPageList vacpagelist, Relation indrel, { if (stats->num_index_tuples > num_tuples + keep_tuples || !vac_is_partial_index(indrel)) - elog(NOTICE, "Index %s: NUMBER OF INDEX' TUPLES (%.0f) IS NOT THE SAME AS HEAP' (%.0f).\ + elog(WARNING, "Index %s: NUMBER OF INDEX' TUPLES (%.0f) IS NOT THE SAME AS HEAP' (%.0f).\ \n\tRecreate the index.", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples); diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 39a9679922f..516fe35f2a9 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -31,7 +31,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.12 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.13 2002/03/06 06:09:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -142,7 +142,7 @@ lazy_vacuum_rel(Relation onerel, VacuumStmt *vacstmt) elevel = INFO; else elevel = DEBUG1; - + vacuum_set_xid_limits(vacstmt, onerel->rd_rel->relisshared, &OldestXmin, &FreezeLimit); @@ -263,7 +263,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE); if (PageIsNew(page)) { - elog(NOTICE, "Rel %s: Uninitialized page %u - fixing", + elog(WARNING, "Rel %s: Uninitialized page %u - fixing", relname, blkno); PageInit(page, BufferGetPageSize(buf), 0); lazy_record_free_space(vacrelstats, blkno, @@ -367,7 +367,7 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, */ if (!OidIsValid(tuple.t_data->t_oid) && onerel->rd_rel->relhasoids) - elog(NOTICE, "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d.", + elog(WARNING, "Rel %s: TID %u/%u: OID IS INVALID. TUPGONE %d.", relname, blkno, offnum, (int) tupgone); if (tupgone) diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 594b8643067..466bfec202f 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.59 2002/03/02 21:39:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.60 2002/03/06 06:09:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -250,7 +250,7 @@ parse_datestyle_internal(char *value) } if (dcnt > 1 || ecnt > 1) - elog(NOTICE, "Conflicting settings for date"); + elog(WARNING, "Conflicting settings for date"); return TRUE; } |