Add runtime configuration option "silent_mode".
authorTatsuo Ishii
Sun, 8 Oct 2000 09:25:38 +0000 (09:25 +0000)
committerTatsuo Ishii
Sun, 8 Oct 2000 09:25:38 +0000 (09:25 +0000)
This is equivalent to postmaster's -S option.

doc/src/sgml/runtime.sgml
src/backend/postmaster/postmaster.c
src/backend/utils/misc/guc.c
src/include/miscadmin.h

index b27b13294af510eb85df50b01bb8eb616ddc8977..7b1fbd68a3338d85ede99135d4652bc0d3021327 100644 (file)
@@ -1,5 +1,5 @@
 
 
 
@@ -962,6 +962,21 @@ env PGOPTIONS='--geqo=off' psql
       
      
 
+     
+      SILENT_MODE (bool)
+      
+       
+       Runs postmaster silently. If this option is set, postmaser
+        will automatically run in background and any controlling ttys
+        are disassociated, thus no message is put to stdout or
+        stderr(same effect as postmaster's -S option). Unless some
+        logging systems such as syslog is enabled, using this option
+        is discouraged since it makes difficult to find error
+        messages.
+       
+      
+     
+
      
       SORT_MEM (integer)
       
index 99ae61b2b5bb6572c967535ea4d1adf2f2bf6edb..7b49bcdab9d1c80775a800ba3544dc9022388362 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.168 2000/10/03 03:11:16 momjian Exp $
+ *   $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.169 2000/10/08 09:25:36 ishii Exp $
  *
  * NOTES
  *
@@ -194,7 +194,7 @@ static int  SendStop = false;
 
 bool NetServer = false;    /* listen on TCP/IP */
 bool EnableSSL = false;
-
+bool SilentMode = false;   /* silent mode (-S) */
 
 static pid_t StartupPID = 0,
            ShutdownPID = 0;
@@ -302,7 +302,6 @@ PostmasterMain(int argc, char *argv[])
 {
    int         opt;
    int         status;
-   int         silentflag = 0;
    char        original_extraoptions[MAXPGPATH];
 
    IsUnderPostmaster = true;   /* so that backends know this */
@@ -501,7 +500,7 @@ PostmasterMain(int argc, char *argv[])
                 * it's most badly needed on SysV-derived systems like
                 * SVR4 and HP-UX.
                 */
-               silentflag = 1;
+               SilentMode = true;
                break;
            case 's':
 
@@ -601,7 +600,7 @@ PostmasterMain(int argc, char *argv[])
    BackendList = DLNewList();
    PortList = DLNewList();
 
-   if (silentflag)
+   if (SilentMode)
        pmdaemonize(argc, argv);
    else
    {
index 1cbc4121a0699f2d05a6406b0c61161d99b1d549..e877f41e737c1b84583708cefbe1f96ed557e67e 100644 (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.11 2000/09/06 19:54:47 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.12 2000/10/08 09:25:37 ishii Exp $
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  * Written by Peter Eisentraut .
@@ -162,6 +162,7 @@ ConfigureNamesBool[] =
    {"tcpip_socket",            PGC_POSTMASTER, &NetServer,             false},
    {"ssl",                     PGC_POSTMASTER, &EnableSSL,             false},
    {"fsync",                   PGC_USERSET,    &enableFsync,           true},
+   {"silent_mode",             PGC_POSTMASTER, &SilentMode,            false},
 
    {"log_connections",         PGC_SIGHUP,     &Log_connections,       false},
    {"log_timestamp",           PGC_SIGHUP,     &Log_timestamp,         false},
index 2132b3bb28ecd6fe310acf1fe48db67221960c43..fcced217efb928c6ec2fdadd801e563c4b29b045 100644 (file)
@@ -12,7 +12,7 @@
  * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Id: miscadmin.h,v 1.67 2000/09/19 18:17:58 petere Exp $
+ * $Id: miscadmin.h,v 1.68 2000/10/08 09:25:38 ishii Exp $
  *
  * NOTES
  *   some of the information in this file will be moved to
@@ -108,6 +108,7 @@ extern int  SortMem;
 
 extern bool NetServer;
 extern bool EnableSSL;
+extern bool SilentMode;
 extern int MaxBackends;
 extern int NBuffers;
 extern int PostPortName;