mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
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.
This commit is contained in:
4
src/backend/utils/cache/catcache.c
vendored
4
src/backend/utils/cache/catcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.90 2002/03/03 17:47:55 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.91 2002/03/06 06:10:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -463,7 +463,7 @@ AtEOXact_CatCache(bool isCommit)
|
||||
if (ct->refcount != 0)
|
||||
{
|
||||
if (isCommit)
|
||||
elog(NOTICE, "Cache reference leak: cache %s (%d), tuple %u has count %d",
|
||||
elog(WARNING, "Cache reference leak: cache %s (%d), tuple %u has count %d",
|
||||
ct->my_cache->cc_relname, ct->my_cache->id,
|
||||
ct->tuple.t_data->t_oid,
|
||||
ct->refcount);
|
||||
|
20
src/backend/utils/cache/relcache.c
vendored
20
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.153 2002/03/03 17:47:55 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.154 2002/03/06 06:10:21 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -236,17 +236,17 @@ do { \
|
||||
relname, \
|
||||
HASH_REMOVE, NULL); \
|
||||
if (namehentry == NULL) \
|
||||
elog(NOTICE, "trying to delete a reldesc that does not exist."); \
|
||||
elog(WARNING, "trying to delete a reldesc that does not exist."); \
|
||||
idhentry = (RelIdCacheEnt*)hash_search(RelationIdCache, \
|
||||
(void *)&(RELATION->rd_id), \
|
||||
HASH_REMOVE, NULL); \
|
||||
if (idhentry == NULL) \
|
||||
elog(NOTICE, "trying to delete a reldesc that does not exist."); \
|
||||
elog(WARNING, "trying to delete a reldesc that does not exist."); \
|
||||
nodentry = (RelNodeCacheEnt*)hash_search(RelationNodeCache, \
|
||||
(void *)&(RELATION->rd_node), \
|
||||
HASH_REMOVE, NULL); \
|
||||
if (nodentry == NULL) \
|
||||
elog(NOTICE, "trying to delete a reldesc that does not exist."); \
|
||||
elog(WARNING, "trying to delete a reldesc that does not exist."); \
|
||||
} while(0)
|
||||
|
||||
|
||||
@ -2471,7 +2471,7 @@ AttrDefaultFetch(Relation relation)
|
||||
if (adform->adnum != attrdef[i].adnum)
|
||||
continue;
|
||||
if (attrdef[i].adbin != NULL)
|
||||
elog(NOTICE, "AttrDefaultFetch: second record found for attr %s in rel %s",
|
||||
elog(WARNING, "AttrDefaultFetch: second record found for attr %s in rel %s",
|
||||
NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname),
|
||||
RelationGetRelationName(relation));
|
||||
|
||||
@ -2479,7 +2479,7 @@ AttrDefaultFetch(Relation relation)
|
||||
Anum_pg_attrdef_adbin,
|
||||
adrel->rd_att, &isnull);
|
||||
if (isnull)
|
||||
elog(NOTICE, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s",
|
||||
elog(WARNING, "AttrDefaultFetch: adbin IS NULL for attr %s in rel %s",
|
||||
NameStr(relation->rd_att->attrs[adform->adnum - 1]->attname),
|
||||
RelationGetRelationName(relation));
|
||||
else
|
||||
@ -2490,7 +2490,7 @@ AttrDefaultFetch(Relation relation)
|
||||
}
|
||||
|
||||
if (i >= ndef)
|
||||
elog(NOTICE, "AttrDefaultFetch: unexpected record found for attr %d in rel %s",
|
||||
elog(WARNING, "AttrDefaultFetch: unexpected record found for attr %d in rel %s",
|
||||
adform->adnum,
|
||||
RelationGetRelationName(relation));
|
||||
}
|
||||
@ -2499,7 +2499,7 @@ AttrDefaultFetch(Relation relation)
|
||||
heap_close(adrel, AccessShareLock);
|
||||
|
||||
if (found != ndef)
|
||||
elog(NOTICE, "AttrDefaultFetch: %d record(s) not found for rel %s",
|
||||
elog(WARNING, "AttrDefaultFetch: %d record(s) not found for rel %s",
|
||||
ndef - found, RelationGetRelationName(relation));
|
||||
}
|
||||
|
||||
@ -3020,7 +3020,7 @@ write_relcache_init_file(void)
|
||||
* We used to consider this a fatal error, but we might as well
|
||||
* continue with backend startup ...
|
||||
*/
|
||||
elog(NOTICE, "Cannot create init file %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename);
|
||||
elog(WARNING, "Cannot create init file %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -3168,7 +3168,7 @@ write_relcache_init_file(void)
|
||||
*/
|
||||
if (rename(tempfilename, finalfilename) < 0)
|
||||
{
|
||||
elog(NOTICE, "Cannot rename init file %s to %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename, finalfilename);
|
||||
elog(WARNING, "Cannot rename init file %s to %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename, finalfilename);
|
||||
/*
|
||||
* If we fail, try to clean up the useless temp file; don't bother
|
||||
* to complain if this fails too.
|
||||
|
Reference in New Issue
Block a user