Turn GUC log_min_error_statement off by default by setting it to PANIC.
authorBruce Momjian
Wed, 2 Oct 2002 16:27:57 +0000 (16:27 +0000)
committerBruce Momjian
Wed, 2 Oct 2002 16:27:57 +0000 (16:27 +0000)
doc/src/sgml/runtime.sgml
src/backend/utils/misc/guc.c

index 36adf5ec9477b3fb8d9bec477a51ab1c79f895ae..1bb3ce7f07e1f5158d42b7cd7c968c60a1613b02 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -1036,15 +1036,15 @@ env PGOPTIONS='-c geqo=off' psql
       LOG_MIN_ERROR_STATEMENT (string)
       
        
-        This controls which log messages are accompanied by the original
-        query which generated the message. All queries matching the setting
-        or which are of a higher severity than the setting are logged. The
-        default is ERROR. Valid values are
-        DEBUG5DEBUG4
-        DEBUG3DEBUG2
+        This controls which message types output the original query to
+        the server logs. All queries matching the setting or higher are
+        logged. The default is PANIC. Valid values
+        are DEBUG5DEBUG4,
+        DEBUG3DEBUG2,
         DEBUG1INFO,
-        NOTICEWARNING
-        and ERROR.
+        NOTICEWARNING,
+        ERRORFATAL, and
+   PANIC.
        
        
         It is recommended you enable LOG_PID as well
index fa2057ca935325e40d0aaef70e5d1fc2ba2aea4f..2e386afab15a9b5d19d298353a4ed423efc67986 100644 (file)
@@ -5,7 +5,7 @@
  * command, configuration file, and command line options.
  * See src/backend/utils/misc/README for more information.
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.96 2002/09/22 19:52:38 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.97 2002/10/02 16:27:57 momjian Exp $
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  * Written by Peter Eisentraut .
@@ -104,7 +104,7 @@ bool        Password_encryption = true;
 
 int            log_min_error_statement = ERROR;
 char      *log_min_error_statement_str = NULL;
-const char log_min_error_statement_str_default[] = "error";
+const char log_min_error_statement_str_default[] = "panic";
 
 int            server_min_messages = NOTICE;
 char      *server_min_messages_str = NULL;
@@ -3000,6 +3000,17 @@ assign_msglvl(int *var, const char *newval, bool doit, bool interactive)
        if (doit)
            (*var) = ERROR;
    }
+   /* We allow FATAL/PANIC for client-side messages too. */
+   else if (strcasecmp(newval, "fatal") == 0)
+   {
+       if (doit)
+           (*var) = FATAL;
+   }
+   else if (strcasecmp(newval, "panic") == 0)
+   {
+       if (doit)
+           (*var) = PANIC;
+   }
    else
        return NULL;            /* fail */
    return newval;              /* OK */