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:
@@ -1,7 +1,7 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
* formatting.c
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.50 2002/02/18 14:24:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.51 2002/03/06 06:10:12 momjian Exp $
|
||||
*
|
||||
*
|
||||
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
|
||||
@@ -64,7 +64,7 @@
|
||||
*/
|
||||
/***
|
||||
#define DEBUG_TO_FROM_CHAR
|
||||
#define DEBUG_elog_output NOTICE
|
||||
#define DEBUG_elog_output DEBUG3
|
||||
***/
|
||||
|
||||
#include "postgres.h"
|
||||
@@ -1867,7 +1867,7 @@ dch_time(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
|
||||
x == 2 ? 10 : 1;
|
||||
|
||||
/*
|
||||
* elog(NOTICE, "X: %d, MS: %d, LEN: %d", x, tmfc->ms,
|
||||
* elog(DEBUG3, "X: %d, MS: %d, LEN: %d", x, tmfc->ms,
|
||||
* len);
|
||||
*/
|
||||
return len - 1 + SKIP_THth(suf);
|
||||
@@ -1908,7 +1908,7 @@ dch_time(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
|
||||
x == 5 ? 10 : 1;
|
||||
|
||||
/*
|
||||
* elog(NOTICE, "X: %d, US: %d, LEN: %d", x, tmfc->us,
|
||||
* elog(DEBUG3, "X: %d, US: %d, LEN: %d", x, tmfc->us,
|
||||
* len);
|
||||
*/
|
||||
return len - 1 + SKIP_THth(suf);
|
||||
@@ -2430,7 +2430,7 @@ dch_date(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
|
||||
else if (flag == FROM_CHAR)
|
||||
{
|
||||
sscanf(inout, "%03d", &tmfc->year);
|
||||
|
||||
|
||||
/*
|
||||
* 3-digit year:
|
||||
* '100' ... '999' = 1100 ... 1999
|
||||
@@ -2466,7 +2466,7 @@ dch_date(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
|
||||
* 2-digit year:
|
||||
* '00' ... '69' = 2000 ... 2069
|
||||
* '70' ... '99' = 1970 ... 1999
|
||||
*/
|
||||
*/
|
||||
if (tmfc->year < 70)
|
||||
tmfc->year += 2000;
|
||||
else
|
||||
@@ -2492,7 +2492,7 @@ dch_date(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
|
||||
else if (flag == FROM_CHAR)
|
||||
{
|
||||
sscanf(inout, "%1d", &tmfc->year);
|
||||
|
||||
|
||||
/*
|
||||
* 1-digit year: always +2000
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.91 2001/10/25 05:49:44 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.92 2002/03/06 06:10:13 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@@ -367,7 +367,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
|
||||
*/
|
||||
StrNCpy(*tzn, tm->tm_zone, MAXTZLEN + 1);
|
||||
if (strlen(tm->tm_zone) > MAXTZLEN)
|
||||
elog(NOTICE, "Invalid timezone \'%s\'", tm->tm_zone);
|
||||
elog(WARNING, "Invalid timezone \'%s\'", tm->tm_zone);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,7 +400,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn)
|
||||
*/
|
||||
StrNCpy(*tzn, tzname[tm->tm_isdst], MAXTZLEN + 1);
|
||||
if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN)
|
||||
elog(NOTICE, "Invalid timezone \'%s\'", tzname[tm->tm_isdst]);
|
||||
elog(WARNING, "Invalid timezone \'%s\'", tzname[tm->tm_isdst]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* The PostgreSQL locale utils.
|
||||
*
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.14 2002/03/02 21:39:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/pg_locale.c,v 1.15 2002/03/06 06:10:14 momjian Exp $
|
||||
*
|
||||
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
|
||||
*
|
||||
@@ -119,28 +119,28 @@ static void
|
||||
PGLC_setlocale(PG_LocaleCategories *lc)
|
||||
{
|
||||
if (!setlocale(LC_COLLATE, lc->lc_collate))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_COLLATE=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_COLLATE=%s' cannot be honored.",
|
||||
lc->lc_collate);
|
||||
|
||||
if (!setlocale(LC_CTYPE, lc->lc_ctype))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_CTYPE=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_CTYPE=%s' cannot be honored.",
|
||||
lc->lc_ctype);
|
||||
|
||||
if (!setlocale(LC_NUMERIC, lc->lc_numeric))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_NUMERIC=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_NUMERIC=%s' cannot be honored.",
|
||||
lc->lc_numeric);
|
||||
|
||||
if (!setlocale(LC_TIME, lc->lc_time))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_TIME=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_TIME=%s' cannot be honored.",
|
||||
lc->lc_time);
|
||||
|
||||
if (!setlocale(LC_MONETARY, lc->lc_monetary))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_MONETARY=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_MONETARY=%s' cannot be honored.",
|
||||
lc->lc_monetary);
|
||||
|
||||
#ifdef LC_MESSAGES
|
||||
if (!setlocale(LC_MESSAGES, lc->lc_messages))
|
||||
elog(NOTICE, "pg_setlocale(): 'LC_MESSAGES=%s' cannot be honored.",
|
||||
elog(WARNING, "pg_setlocale(): 'LC_MESSAGES=%s' cannot be honored.",
|
||||
lc->lc_messages);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* Portions Copyright (c) 2000-2001, PostgreSQL Global Development Group
|
||||
* Copyright 1999 Jan Wieck
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.31 2001/11/12 06:09:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.32 2002/03/06 06:10:14 momjian Exp $
|
||||
*
|
||||
* ----------
|
||||
*/
|
||||
@@ -251,7 +251,7 @@ RI_FKey_check(PG_FUNCTION_ARGS)
|
||||
* Execute the plan
|
||||
*/
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_check()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_check()");
|
||||
|
||||
SetUserId(RelationGetForm(pk_rel)->relowner);
|
||||
/* pk_rel is no longer neede OK ? */
|
||||
@@ -269,7 +269,7 @@ RI_FKey_check(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_PK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_check()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_check()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -362,7 +362,7 @@ RI_FKey_check(PG_FUNCTION_ARGS)
|
||||
* to see it).
|
||||
*/
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_check()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_check()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the real check
|
||||
@@ -452,7 +452,7 @@ RI_FKey_check(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_PK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_check()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_check()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -594,7 +594,7 @@ RI_FKey_noaction_del(PG_FUNCTION_ARGS)
|
||||
heap_close(fk_rel, NoLock);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_noaction_del()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_noaction_del()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the restrict delete
|
||||
@@ -675,7 +675,7 @@ RI_FKey_noaction_del(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_FK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_noaction_del()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_noaction_del()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -808,7 +808,7 @@ RI_FKey_noaction_upd(PG_FUNCTION_ARGS)
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_noaction_upd()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_noaction_upd()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the noaction update
|
||||
@@ -889,7 +889,7 @@ RI_FKey_noaction_upd(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_FK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_noaction_upd()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_noaction_upd()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -1011,7 +1011,7 @@ RI_FKey_cascade_del(PG_FUNCTION_ARGS)
|
||||
heap_close(fk_rel, NoLock);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_cascade_del()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_cascade_del()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the cascaded delete
|
||||
@@ -1082,7 +1082,7 @@ RI_FKey_cascade_del(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_cascade_del()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_cascade_del()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -1214,7 +1214,7 @@ RI_FKey_cascade_upd(PG_FUNCTION_ARGS)
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_cascade_upd()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_cascade_upd()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the cascaded update of
|
||||
@@ -1306,7 +1306,7 @@ RI_FKey_cascade_upd(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_cascade_upd()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_cascade_upd()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -1435,7 +1435,7 @@ RI_FKey_restrict_del(PG_FUNCTION_ARGS)
|
||||
heap_close(fk_rel, NoLock);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_restrict_del()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_restrict_del()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the restrict delete
|
||||
@@ -1517,7 +1517,7 @@ RI_FKey_restrict_del(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_FK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_restrict_del()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_restrict_del()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -1655,7 +1655,7 @@ RI_FKey_restrict_upd(PG_FUNCTION_ARGS)
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_restrict_upd()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_restrict_upd()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the restrict update
|
||||
@@ -1739,7 +1739,7 @@ RI_FKey_restrict_upd(PG_FUNCTION_ARGS)
|
||||
tgargs[RI_FK_RELNAME_ARGNO]);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_restrict_upd()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_restrict_upd()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -1861,7 +1861,7 @@ RI_FKey_setnull_del(PG_FUNCTION_ARGS)
|
||||
heap_close(fk_rel, NoLock);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_setnull_del()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_setnull_del()");
|
||||
|
||||
/*
|
||||
* Fetch or prepare a saved plan for the set null delete
|
||||
@@ -1943,7 +1943,7 @@ RI_FKey_setnull_del(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_setnull_del()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_setnull_del()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -2078,7 +2078,7 @@ RI_FKey_setnull_upd(PG_FUNCTION_ARGS)
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_setnull_upd()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_setnull_upd()");
|
||||
|
||||
/*
|
||||
* "MATCH <unspecified>" only changes columns corresponding to
|
||||
@@ -2196,7 +2196,7 @@ RI_FKey_setnull_upd(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_setnull_upd()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_setnull_upd()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -2317,7 +2317,7 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_setdefault_del()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_setdefault_del()");
|
||||
|
||||
/*
|
||||
* Prepare a plan for the set defalt delete operation.
|
||||
@@ -2445,7 +2445,7 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_setdefault_del()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_setdefault_del()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
@@ -2578,7 +2578,7 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
if (SPI_connect() != SPI_OK_CONNECT)
|
||||
elog(NOTICE, "SPI_connect() failed in RI_FKey_setdefault_upd()");
|
||||
elog(WARNING, "SPI_connect() failed in RI_FKey_setdefault_upd()");
|
||||
|
||||
/*
|
||||
* Prepare a plan for the set defalt delete operation.
|
||||
@@ -2721,7 +2721,7 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
|
||||
SetUserId(save_uid);
|
||||
|
||||
if (SPI_finish() != SPI_OK_FINISH)
|
||||
elog(NOTICE, "SPI_finish() failed in RI_FKey_setdefault_upd()");
|
||||
elog(WARNING, "SPI_finish() failed in RI_FKey_setdefault_upd()");
|
||||
|
||||
return PointerGetDatum(NULL);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* back to source text
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.90 2002/02/19 20:11:16 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.91 2002/03/06 06:10:16 momjian Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@@ -2631,7 +2631,7 @@ tleIsArrayAssign(TargetEntry *tle)
|
||||
*/
|
||||
if (aref->refexpr == NULL || !IsA(aref->refexpr, Var) ||
|
||||
((Var *) aref->refexpr)->varattno != tle->resdom->resno)
|
||||
elog(NOTICE, "tleIsArrayAssign: I'm confused ...");
|
||||
elog(WARNING, "tleIsArrayAssign: I'm confused ...");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.63 2002/03/04 03:55:46 ishii Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.64 2002/03/06 06:10:18 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2270,7 +2270,7 @@ interval_trunc(PG_FUNCTION_ARGS)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(NOTICE, "Unable to decode INTERVAL; internal coding error");
|
||||
elog(WARNING, "Unable to decode INTERVAL; internal coding error");
|
||||
*result = *interval;
|
||||
}
|
||||
}
|
||||
@@ -2771,7 +2771,7 @@ interval_part(PG_FUNCTION_ARGS)
|
||||
}
|
||||
else
|
||||
{
|
||||
elog(NOTICE, "Unable to decode INTERVAL"
|
||||
elog(WARNING, "Unable to decode INTERVAL"
|
||||
"\n\tinterval_part() internal coding error");
|
||||
result = 0;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.20 2001/10/25 05:49:46 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.21 2002/03/06 06:10:19 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1197,7 +1197,7 @@ bitposition(PG_FUNCTION_ARGS)
|
||||
mask2 = end_mask << (BITS_PER_BYTE - is);
|
||||
is_match = mask2 == 0;
|
||||
#if 0
|
||||
elog(NOTICE, "S. %d %d em=%2x sm=%2x r=%d",
|
||||
elog(DEBUG3, "S. %d %d em=%2x sm=%2x r=%d",
|
||||
i, is, end_mask, mask2, is_match);
|
||||
#endif
|
||||
break;
|
||||
|
||||
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.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.93 2002/03/04 01:46:03 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.94 2002/03/06 06:10:24 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -44,7 +44,7 @@ const char server_min_messages_str_default[] = "notice";
|
||||
|
||||
int client_min_messages;
|
||||
char *client_min_messages_str = NULL;
|
||||
const char client_min_messages_str_default[] = "info";
|
||||
const char client_min_messages_str_default[] = "notice";
|
||||
|
||||
#ifdef ENABLE_SYSLOG
|
||||
/*
|
||||
@@ -75,10 +75,6 @@ static void send_message_to_frontend(int type, const char *msg);
|
||||
static const char *useful_strerror(int errnum);
|
||||
static const char *elog_message_prefix(int lev);
|
||||
|
||||
#define send_notice_to_frontend(msg) send_message_to_frontend(NOTICE, msg)
|
||||
#define send_error_to_frontend(msg) send_message_to_frontend(ERROR, msg)
|
||||
|
||||
|
||||
static int Debugfile = -1;
|
||||
|
||||
|
||||
@@ -190,7 +186,7 @@ elog(int lev, const char *fmt,...)
|
||||
if (ClientAuthInProgress)
|
||||
output_to_client = (lev >= ERROR);
|
||||
else
|
||||
output_to_client = (lev >= client_min_messages);
|
||||
output_to_client = (lev >= client_min_messages || lev == INFO);
|
||||
}
|
||||
|
||||
/* Skip formatting effort if non-error message will not be output */
|
||||
@@ -376,6 +372,7 @@ elog(int lev, const char *fmt,...)
|
||||
syslog_level = LOG_INFO;
|
||||
break;
|
||||
case NOTICE:
|
||||
case WARNING:
|
||||
syslog_level = LOG_NOTICE;
|
||||
break;
|
||||
case ERROR:
|
||||
@@ -415,9 +412,9 @@ elog(int lev, const char *fmt,...)
|
||||
*/
|
||||
oldcxt = MemoryContextSwitchTo(ErrorContext);
|
||||
|
||||
if (lev <= NOTICE)
|
||||
if (lev <= WARNING)
|
||||
/* exclude the timestamp from msg sent to frontend */
|
||||
send_notice_to_frontend(msg_buf + timestamp_size);
|
||||
send_message_to_frontend(lev, msg_buf + timestamp_size);
|
||||
else
|
||||
{
|
||||
/*
|
||||
@@ -426,7 +423,7 @@ elog(int lev, const char *fmt,...)
|
||||
* protocol.
|
||||
*/
|
||||
pq_endcopyout(true);
|
||||
send_error_to_frontend(msg_buf + timestamp_size);
|
||||
send_message_to_frontend(ERROR, msg_buf + timestamp_size);
|
||||
}
|
||||
|
||||
MemoryContextSwitchTo(oldcxt);
|
||||
@@ -509,7 +506,7 @@ elog(int lev, const char *fmt,...)
|
||||
proc_exit(2);
|
||||
}
|
||||
|
||||
/* We reach here if lev <= NOTICE. OK to return to caller. */
|
||||
/* We reach here if lev <= WARNING. OK to return to caller. */
|
||||
}
|
||||
|
||||
|
||||
@@ -747,7 +744,8 @@ send_message_to_frontend(int type, const char *msg)
|
||||
AssertArg(type <= ERROR);
|
||||
|
||||
pq_beginmessage(&buf);
|
||||
pq_sendbyte(&buf, type != ERROR ? 'N' : 'E'); /* N is INFO or NOTICE */
|
||||
pq_sendbyte(&buf, type != ERROR ? 'N' : 'E'); /* N is INFO, NOTICE,
|
||||
* or WARNING */
|
||||
pq_sendstring(&buf, msg);
|
||||
pq_endmessage(&buf);
|
||||
|
||||
@@ -820,6 +818,9 @@ elog_message_prefix(int lev)
|
||||
case NOTICE:
|
||||
prefix = gettext("NOTICE: ");
|
||||
break;
|
||||
case WARNING:
|
||||
prefix = gettext("WARNING: ");
|
||||
break;
|
||||
case ERROR:
|
||||
prefix = gettext("ERROR: ");
|
||||
break;
|
||||
@@ -852,6 +853,7 @@ check_server_min_messages(const char *lev)
|
||||
strcasecmp(lev, "log") == 0 ||
|
||||
strcasecmp(lev, "info") == 0 ||
|
||||
strcasecmp(lev, "notice") == 0 ||
|
||||
strcasecmp(lev, "warning") == 0 ||
|
||||
strcasecmp(lev, "error") == 0 ||
|
||||
strcasecmp(lev, "fatal") == 0 ||
|
||||
strcasecmp(lev, "panic") == 0)
|
||||
@@ -880,6 +882,8 @@ assign_server_min_messages(const char *lev)
|
||||
server_min_messages = INFO;
|
||||
else if (strcasecmp(lev, "notice") == 0)
|
||||
server_min_messages = NOTICE;
|
||||
else if (strcasecmp(lev, "warning") == 0)
|
||||
server_min_messages = WARNING;
|
||||
else if (strcasecmp(lev, "error") == 0)
|
||||
server_min_messages = ERROR;
|
||||
else if (strcasecmp(lev, "fatal") == 0)
|
||||
@@ -901,8 +905,8 @@ check_client_min_messages(const char *lev)
|
||||
strcasecmp(lev, "debug4") == 0 ||
|
||||
strcasecmp(lev, "debug5") == 0 ||
|
||||
strcasecmp(lev, "log") == 0 ||
|
||||
strcasecmp(lev, "info") == 0 ||
|
||||
strcasecmp(lev, "notice") == 0 ||
|
||||
strcasecmp(lev, "warning") == 0 ||
|
||||
strcasecmp(lev, "error") == 0)
|
||||
return true;
|
||||
return false;
|
||||
@@ -925,10 +929,10 @@ assign_client_min_messages(const char *lev)
|
||||
client_min_messages = DEBUG5;
|
||||
else if (strcasecmp(lev, "log") == 0)
|
||||
client_min_messages = LOG;
|
||||
else if (strcasecmp(lev, "info") == 0)
|
||||
client_min_messages = INFO;
|
||||
else if (strcasecmp(lev, "notice") == 0)
|
||||
client_min_messages = NOTICE;
|
||||
else if (strcasecmp(lev, "warning") == 0)
|
||||
client_min_messages = WARNING;
|
||||
else if (strcasecmp(lev, "error") == 0)
|
||||
client_min_messages = ERROR;
|
||||
else
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.99 2002/03/01 22:45:15 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.100 2002/03/06 06:10:25 momjian Exp $
|
||||
*
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -354,8 +354,8 @@ InitPostgres(const char *dbname, const char *username)
|
||||
InitializeSessionUserIdStandalone();
|
||||
if (!ThereIsAtLeastOneUser())
|
||||
{
|
||||
elog(NOTICE, "There are currently no users defined in this database system.");
|
||||
elog(NOTICE, "You should immediately run 'CREATE USER \"%s\" WITH SYSID %d CREATEUSER;'.",
|
||||
elog(WARNING, "There are currently no users defined in this database system.");
|
||||
elog(WARNING, "You should immediately run 'CREATE USER \"%s\" WITH SYSID %d CREATEUSER;'.",
|
||||
username, BOOTSTRAP_USESYSID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* WIN1250 client encoding support contributed by Pavel Behal
|
||||
* SJIS UDC (NEC selection IBM kanji) support contributed by Eiji Tokuya
|
||||
*
|
||||
* $Id: conv.c,v 1.36 2002/03/05 05:52:43 momjian Exp $
|
||||
* $Id: conv.c,v 1.37 2002/03/06 06:10:26 momjian Exp $
|
||||
*
|
||||
*
|
||||
*/
|
||||
@@ -1311,7 +1311,7 @@ utf_to_local(unsigned char *utf, unsigned char *iso,
|
||||
sizeof(pg_utf_to_local), compare1);
|
||||
if (p == NULL)
|
||||
{
|
||||
elog(NOTICE, "utf_to_local: could not convert UTF-8 (0x%04x). Ignored", iutf);
|
||||
elog(WARNING, "utf_to_local: could not convert UTF-8 (0x%04x). Ignored", iutf);
|
||||
continue;
|
||||
}
|
||||
if (p->code & 0xff000000)
|
||||
@@ -1447,7 +1447,7 @@ local_to_utf(unsigned char *iso, unsigned char *utf,
|
||||
sizeof(pg_local_to_utf), compare2);
|
||||
if (p == NULL)
|
||||
{
|
||||
elog(NOTICE, "local_to_utf: could not convert (0x%04x) %s to UTF-8. Ignored",
|
||||
elog(WARNING, "local_to_utf: could not convert (0x%04x) %s to UTF-8. Ignored",
|
||||
iiso, (&pg_enc2name_tbl[encoding])->name);
|
||||
continue;
|
||||
}
|
||||
@@ -1750,8 +1750,8 @@ static void
|
||||
utf_to_win1250(unsigned char *utf, unsigned char *euc, int len)
|
||||
|
||||
{
|
||||
utf_to_local(utf, euc, ULmapWIN1250,
|
||||
sizeof(ULmapWIN1250) / sizeof(pg_utf_to_local), len);
|
||||
utf_to_local(utf, euc, ULmapWIN1250,
|
||||
sizeof(ULmapWIN1250) / sizeof(pg_utf_to_local), len);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1760,8 +1760,8 @@ utf_to_win1250(unsigned char *utf, unsigned char *euc, int len)
|
||||
static void
|
||||
win1250_to_utf(unsigned char *euc, unsigned char *utf, int len)
|
||||
{
|
||||
local_to_utf(euc, utf, LUmapWIN1250,
|
||||
sizeof(LUmapWIN1250) / sizeof(pg_local_to_utf), PG_WIN1250, len);
|
||||
local_to_utf(euc, utf, LUmapWIN1250,
|
||||
sizeof(LUmapWIN1250) / sizeof(pg_local_to_utf), PG_WIN1250, len);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1771,8 +1771,8 @@ static void
|
||||
utf_to_win1256(unsigned char *utf, unsigned char *euc, int len)
|
||||
|
||||
{
|
||||
utf_to_local(utf, euc, ULmapWIN1256,
|
||||
sizeof(ULmapWIN1256) / sizeof(pg_utf_to_local), len);
|
||||
utf_to_local(utf, euc, ULmapWIN1256,
|
||||
sizeof(ULmapWIN1256) / sizeof(pg_utf_to_local), len);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Support for grand unified configuration scheme, including SET
|
||||
* command, configuration file, and command line options.
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.61 2002/03/02 21:39:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.62 2002/03/06 06:10:27 momjian Exp $
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
@@ -896,7 +896,7 @@ set_config_option(const char *name, const char *value,
|
||||
if (context == PGC_SIGHUP)
|
||||
elevel = DEBUG1;
|
||||
else if (guc_session_init)
|
||||
elevel = NOTICE;
|
||||
elevel = INFO;
|
||||
else
|
||||
elevel = ERROR;
|
||||
|
||||
@@ -1259,7 +1259,7 @@ _ShowOption(enum config_type opttype, struct config_generic * record)
|
||||
default:
|
||||
val = "???";
|
||||
}
|
||||
elog(NOTICE, "%s is %s", record->name, val);
|
||||
elog(INFO, "%s is %s", record->name, val);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1408,13 +1408,13 @@ ProcessGUCArray(ArrayType *array, GucSource source)
|
||||
ParseLongOption(s, &name, &value);
|
||||
if (!value)
|
||||
{
|
||||
elog(NOTICE, "cannot to parse setting \"%s\"", name);
|
||||
continue;
|
||||
elog(WARNING, "cannot to parse setting \"%s\"", name);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* prevent errors from incorrect options */
|
||||
guc_session_init = true;
|
||||
|
||||
|
||||
SetConfigOption(name, value, PGC_SUSET, source);
|
||||
|
||||
guc_session_init = false;
|
||||
@@ -1441,7 +1441,7 @@ GUCArrayAdd(ArrayType *array, const char *name, const char *value)
|
||||
newval = palloc(strlen(name) + 1 + strlen(value) + 1);
|
||||
sprintf(newval, "%s=%s", name, value);
|
||||
datum = DirectFunctionCall1(textin, CStringGetDatum(newval));
|
||||
|
||||
|
||||
if (array)
|
||||
{
|
||||
int index;
|
||||
|
||||
@@ -113,10 +113,11 @@
|
||||
|
||||
#server_min_messages = notice # Values, in order of decreasing detail:
|
||||
# debug5, debug4, debug3, debug2, debug1,
|
||||
# info, notice, error, log, fatal, panic
|
||||
#client_min_messages = info # Values, in order of decreasing detail:
|
||||
# info, notice, warning, error, log, fatal,
|
||||
# panic
|
||||
#client_min_messages = notice # Values, in order of decreasing detail:
|
||||
# debug5, debug4, debug3, debug2, debug1,
|
||||
# log, info, notice, error
|
||||
# log, notice, warning, error
|
||||
#silent_mode = false
|
||||
|
||||
#log_connections = false
|
||||
|
||||
@@ -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