1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Commit to match discussed elog() changes. Only update is that LOG is

now just below FATAL in server_min_messages.  Added more text to
highlight ordering difference between it and client_min_messages.

---------------------------------------------------------------------------

REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
        DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
        DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
This commit is contained in:
Bruce Momjian
2002-03-02 21:39:36 +00:00
parent 8d8aa931ef
commit a033daf566
85 changed files with 1053 additions and 901 deletions

View File

@ -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.60 2002/03/01 22:45:16 petere Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.61 2002/03/02 21:39:34 momjian Exp $
*
* Copyright 2000 by PostgreSQL Global Development Group
* Written by Peter Eisentraut <peter_e@gmx.net>.
@ -39,6 +39,7 @@
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/datetime.h"
#include "utils/elog.h"
#include "pgstat.h"
@ -432,11 +433,6 @@ static struct config_int
1000, 25, INT_MAX, NULL, NULL
},
{
"debug_level", PGC_USERSET, PGC_S_DEFAULT, &DebugLvl,
0, 0, 16, NULL, NULL
},
#ifdef LOCK_DEBUG
{
"trace_lock_oidmin", PGC_SUSET, PGC_S_DEFAULT, &Trace_lock_oidmin,
@ -556,6 +552,12 @@ static struct config_real
static struct config_string
ConfigureNamesString[] =
{
{
"client_min_messages", PGC_USERSET, PGC_S_DEFAULT, &client_min_messages_str,
client_min_messages_str_default, check_client_min_messages,
assign_client_min_messages
},
{
"default_transaction_isolation", PGC_USERSET, PGC_S_DEFAULT, &default_iso_level_string,
"read committed", check_defaultxactisolevel, assign_defaultxactisolevel
@ -571,6 +573,12 @@ static struct config_string
PG_KRB_SRVTAB, NULL, NULL
},
{
"server_min_messages", PGC_USERSET, PGC_S_DEFAULT, &server_min_messages_str,
server_min_messages_str_default, check_server_min_messages,
assign_server_min_messages
},
#ifdef ENABLE_SYSLOG
{
"syslog_facility", PGC_POSTMASTER, PGC_S_DEFAULT, &Syslog_facility,
@ -886,7 +894,7 @@ set_config_option(const char *name, const char *value,
bool makeDefault;
if (context == PGC_SIGHUP)
elevel = DEBUG;
elevel = DEBUG1;
else if (guc_session_init)
elevel = NOTICE;
else
@ -901,9 +909,8 @@ set_config_option(const char *name, const char *value,
if (record->source > source)
{
if (DebugLvl > 1)
elog(DEBUG, "setting %s refused because previous source is higher",
name);
elog(DEBUG2, "setting %s refused because previous source is higher",
name);
return false;
}
makeDefault = source < PGC_S_SESSION;