mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +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:
@@ -11,7 +11,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.44 2001/11/05 17:46:30 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.45 2002/03/06 06:10:29 momjian Exp $
|
||||
*
|
||||
* NOTE:
|
||||
* This is a new (Feb. 05, 1999) implementation of the allocation set
|
||||
@@ -736,7 +736,7 @@ AllocSetFree(MemoryContext context, void *pointer)
|
||||
/* Test for someone scribbling on unused space in chunk */
|
||||
if (chunk->requested_size < chunk->size)
|
||||
if (((char *) pointer)[chunk->requested_size] != 0x7E)
|
||||
elog(NOTICE, "AllocSetFree: detected write past chunk end in %s %p",
|
||||
elog(WARNING, "AllocSetFree: detected write past chunk end in %s %p",
|
||||
set->header.name, chunk);
|
||||
#endif
|
||||
|
||||
@@ -811,7 +811,7 @@ AllocSetRealloc(MemoryContext context, void *pointer, Size size)
|
||||
/* Test for someone scribbling on unused space in chunk */
|
||||
if (chunk->requested_size < oldsize)
|
||||
if (((char *) pointer)[chunk->requested_size] != 0x7E)
|
||||
elog(NOTICE, "AllocSetRealloc: detected write past chunk end in %s %p",
|
||||
elog(WARNING, "AllocSetRealloc: detected write past chunk end in %s %p",
|
||||
set->header.name, chunk);
|
||||
#endif
|
||||
|
||||
@@ -997,7 +997,7 @@ AllocSetStats(MemoryContext context)
|
||||
* AllocSetCheck
|
||||
* Walk through chunks and check consistency of memory.
|
||||
*
|
||||
* NOTE: report errors as NOTICE, *not* ERROR or FATAL. Otherwise you'll
|
||||
* NOTE: report errors as WARNING, *not* ERROR or FATAL. Otherwise you'll
|
||||
* find yourself in an infinite loop when trouble occurs, because this
|
||||
* routine will be entered again when elog cleanup tries to release memory!
|
||||
*/
|
||||
@@ -1021,7 +1021,7 @@ AllocSetCheck(MemoryContext context)
|
||||
if (!blk_used)
|
||||
{
|
||||
if (set->keeper != block)
|
||||
elog(NOTICE, "AllocSetCheck: %s: empty block %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: empty block %p",
|
||||
name, block);
|
||||
}
|
||||
|
||||
@@ -1043,16 +1043,16 @@ AllocSetCheck(MemoryContext context)
|
||||
* Check chunk size
|
||||
*/
|
||||
if (dsize > chsize)
|
||||
elog(NOTICE, "AllocSetCheck: %s: req size > alloc size for chunk %p in block %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: req size > alloc size for chunk %p in block %p",
|
||||
name, chunk, block);
|
||||
if (chsize < (1 << ALLOC_MINBITS))
|
||||
elog(NOTICE, "AllocSetCheck: %s: bad size %lu for chunk %p in block %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: bad size %lu for chunk %p in block %p",
|
||||
name, (unsigned long) chsize, chunk, block);
|
||||
|
||||
/* single-chunk block? */
|
||||
if (chsize > ALLOC_CHUNK_LIMIT &&
|
||||
chsize + ALLOC_CHUNKHDRSZ != blk_used)
|
||||
elog(NOTICE, "AllocSetCheck: %s: bad single-chunk %p in block %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: bad single-chunk %p in block %p",
|
||||
name, chunk, block);
|
||||
|
||||
/*
|
||||
@@ -1061,14 +1061,14 @@ AllocSetCheck(MemoryContext context)
|
||||
* check as easily...)
|
||||
*/
|
||||
if (dsize > 0 && chunk->aset != (void *) set)
|
||||
elog(NOTICE, "AllocSetCheck: %s: bogus aset link in block %p, chunk %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: bogus aset link in block %p, chunk %p",
|
||||
name, block, chunk);
|
||||
|
||||
/*
|
||||
* Check for overwrite of "unallocated" space in chunk
|
||||
*/
|
||||
if (dsize > 0 && dsize < chsize && *chdata_end != 0x7E)
|
||||
elog(NOTICE, "AllocSetCheck: %s: detected write past chunk end in block %p, chunk %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: detected write past chunk end in block %p, chunk %p",
|
||||
name, block, chunk);
|
||||
|
||||
blk_data += chsize;
|
||||
@@ -1078,7 +1078,7 @@ AllocSetCheck(MemoryContext context)
|
||||
}
|
||||
|
||||
if ((blk_data + (nchunks * ALLOC_CHUNKHDRSZ)) != blk_used)
|
||||
elog(NOTICE, "AllocSetCheck: %s: found inconsistent memory block %p",
|
||||
elog(WARNING, "AllocSetCheck: %s: found inconsistent memory block %p",
|
||||
name, block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.46 2002/02/27 19:35:35 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.47 2002/03/06 06:10:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -77,7 +77,7 @@ do { \
|
||||
if (hentry == NULL) \
|
||||
elog(ERROR, "out of memory in PortalHashTable"); \
|
||||
if (found) \
|
||||
elog(NOTICE, "trying to insert a portal name that exists."); \
|
||||
elog(WARNING, "trying to insert a portal name that exists."); \
|
||||
hentry->portal = PORTAL; \
|
||||
} while(0)
|
||||
|
||||
@@ -90,7 +90,7 @@ do { \
|
||||
hentry = (PortalHashEnt*)hash_search(PortalHashTable, \
|
||||
key, HASH_REMOVE, NULL); \
|
||||
if (hentry == NULL) \
|
||||
elog(NOTICE, "trying to delete portal name that does not exist."); \
|
||||
elog(WARNING, "trying to delete portal name that does not exist."); \
|
||||
} while(0)
|
||||
|
||||
static MemoryContext PortalMemory = NULL;
|
||||
@@ -182,7 +182,7 @@ PortalSetQuery(Portal portal,
|
||||
* Exceptions:
|
||||
* BadState if called when disabled.
|
||||
* BadArg if portal name is invalid.
|
||||
* "NOTICE" if portal name is in use (existing portal is returned!)
|
||||
* "WARNING" if portal name is in use (existing portal is returned!)
|
||||
*/
|
||||
Portal
|
||||
CreatePortal(char *name)
|
||||
@@ -194,7 +194,7 @@ CreatePortal(char *name)
|
||||
portal = GetPortalByName(name);
|
||||
if (PortalIsValid(portal))
|
||||
{
|
||||
elog(NOTICE, "CreatePortal: portal \"%s\" already exists", name);
|
||||
elog(WARNING, "CreatePortal: portal \"%s\" already exists", name);
|
||||
return portal;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user