log_destination should only be PGC_SIGHUP, not PGC_POSTMASTER, as per
authorTom Lane
Sat, 24 Jul 2004 19:51:23 +0000 (19:51 +0000)
committerTom Lane
Sat, 24 Jul 2004 19:51:23 +0000 (19:51 +0000)
discussion yesterday.  Also a few improvements in the associated
documentation.

doc/src/sgml/maintenance.sgml
doc/src/sgml/runtime.sgml
src/backend/utils/misc/guc.c

index b74dfc5baa8b12e8c3062ec86ab50f27b922f03d..91ead3dc1681064b49dd4a148efe8c314e74bfed 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -456,7 +456,7 @@ VACUUM
    The simplest production-grade approach to managing log output is to
    send it all to syslog and let
    syslog deal with file rotation. To do this, set the
-   configurations parameter log_destination to 'syslog' (to log to
+   configuration parameter log_destination to 'syslog' (to log to
    syslog only) in postgresql.conf. Then
    you can send a SIGHUP signal to the
    syslog daemon whenever you want to force it to
index b249d9a5c2491b9c806336e1e60eb14ceef080d0..d552e6a34ff08be770253ee5db1ad0c43b3e0eaa 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -1769,12 +1769,13 @@ SET ENABLE_SEQSCAN TO OFF;
       
        
    PostgreSQL supports several methods
-    for loggning, including stderr and
+    for logging server messages, including
+    stderr and
     syslog. On Windows, 
     eventlog is also supported. Set this
-    option to a list of desired log destinations separated by a
-    comma. The default is to log to stderr 
-    only. This option must be set at server start.
+    option to a list of desired log destinations separated by
+    commas. The default is to log to stderr 
+    only.
        
       
      
@@ -1783,15 +1784,16 @@ SET ENABLE_SEQSCAN TO OFF;
       syslog_facility (string)
        
         
-          This option determines the syslog
-          facility to be used when logging via
-          <application>syslog is enabled. You may choose
+          If logging to syslog is enabled, this option
+          determines the syslog
+          <quote>facility to be used.  You may choose
           from LOCAL0, LOCAL1,
           LOCAL2, LOCAL3, LOCAL4,
           LOCAL5, LOCAL6, LOCAL7;
           the default is LOCAL0. See also the
           documentation of your system's
-          syslog.
+          syslog daemon.
+     This option can only be set at server start.
         
        
      
@@ -1803,8 +1805,9 @@ SET ENABLE_SEQSCAN TO OFF;
          If logging to syslog is enabled, this option
          determines the program name used to identify
          PostgreSQL messages in
-         syslog log messages. The default is
+         syslog logs. The default is
          postgres.
+     This option can only be set at server start.
         
        
       
index af73fd186730c29edebf9305b6976bc1673ab6a6..b9865462a4ec2636b69dd434b93ec3d1bc17d499 100644 (file)
@@ -10,7 +10,7 @@
  * Written by Peter Eisentraut .
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.223 2004/07/21 20:34:46 momjian Exp $
+ *   $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.224 2004/07/24 19:51:23 tgl Exp $
  *
  *--------------------------------------------------------------------
  */
@@ -1625,8 +1625,8 @@ static struct config_string ConfigureNamesString[] =
    },
 
    {
-       {"log_destination", PGC_POSTMASTER, LOGGING_WHERE,
-        gettext_noop("Sets the target for log output."),
+       {"log_destination", PGC_SIGHUP, LOGGING_WHERE,
+        gettext_noop("Sets the destination for server log output."),
         gettext_noop("Valid values are combinations of stderr, syslog "
                      "and eventlog, depending on platform."),
         GUC_LIST_INPUT
@@ -5099,15 +5099,12 @@ assign_log_destination(const char *value, bool doit, GucSource source)
        }
    }
 
+   if (doit)
+       Log_destination = newlogdest;
+
    pfree(rawstring);
    list_free(elemlist);
 
-   /* If we aren't going to do the assignment, just return OK indicator. */
-   if (!doit)
-       return value;
-
-   Log_destination = newlogdest;
-
    return value;
 }