Skip to content

Commit 2af8b96

Browse files
committed
Add runtime configuration option "silent_mode".
This is equivalent to postmaster's -S option.
1 parent be58282 commit 2af8b96

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

doc/src/sgml/runtime.sgml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.26 2000/09/30 16:58:20 petere Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.27 2000/10/08 09:25:35 ishii Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -962,6 +962,21 @@ env PGOPTIONS='--geqo=off' psql
962962
</listitem>
963963
</varlistentry>
964964

965+
<varlistentry>
966+
<term>SILENT_MODE (<type>bool</type>)</term>
967+
<listitem>
968+
<para>
969+
Runs postmaster silently. If this option is set, postmaser
970+
will automatically run in background and any controlling ttys
971+
are disassociated, thus no message is put to stdout or
972+
stderr(same effect as postmaster's -S option). Unless some
973+
logging systems such as syslog is enabled, using this option
974+
is discouraged since it makes difficult to find error
975+
messages.
976+
</para>
977+
</listitem>
978+
</varlistentry>
979+
965980
<varlistentry>
966981
<term>SORT_MEM (<type>integer</type>)</term>
967982
<listitem>

src/backend/postmaster/postmaster.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.168 2000/10/03 03:11:16 momjian Exp $
14+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.169 2000/10/08 09:25:36 ishii Exp $
1515
*
1616
* NOTES
1717
*
@@ -194,7 +194,7 @@ static int SendStop = false;
194194

195195
bool NetServer = false; /* listen on TCP/IP */
196196
bool EnableSSL = false;
197-
197+
bool SilentMode = false; /* silent mode (-S) */
198198

199199
static pid_t StartupPID = 0,
200200
ShutdownPID = 0;
@@ -302,7 +302,6 @@ PostmasterMain(int argc, char *argv[])
302302
{
303303
int opt;
304304
int status;
305-
int silentflag = 0;
306305
char original_extraoptions[MAXPGPATH];
307306

308307
IsUnderPostmaster = true; /* so that backends know this */
@@ -501,7 +500,7 @@ PostmasterMain(int argc, char *argv[])
501500
* it's most badly needed on SysV-derived systems like
502501
* SVR4 and HP-UX.
503502
*/
504-
silentflag = 1;
503+
SilentMode = true;
505504
break;
506505
case 's':
507506

@@ -601,7 +600,7 @@ PostmasterMain(int argc, char *argv[])
601600
BackendList = DLNewList();
602601
PortList = DLNewList();
603602

604-
if (silentflag)
603+
if (SilentMode)
605604
pmdaemonize(argc, argv);
606605
else
607606
{

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Support for grand unified configuration scheme, including SET
55
* command, configuration file, and command line options.
66
*
7-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.11 2000/09/06 19:54:47 petere Exp $
7+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.12 2000/10/08 09:25:37 ishii Exp $
88
*
99
* Copyright 2000 by PostgreSQL Global Development Group
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
@@ -162,6 +162,7 @@ ConfigureNamesBool[] =
162162
{"tcpip_socket", PGC_POSTMASTER, &NetServer, false},
163163
{"ssl", PGC_POSTMASTER, &EnableSSL, false},
164164
{"fsync", PGC_USERSET, &enableFsync, true},
165+
{"silent_mode", PGC_POSTMASTER, &SilentMode, false},
165166

166167
{"log_connections", PGC_SIGHUP, &Log_connections, false},
167168
{"log_timestamp", PGC_SIGHUP, &Log_timestamp, false},

src/include/miscadmin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $Id: miscadmin.h,v 1.67 2000/09/19 18:17:58 petere Exp $
15+
* $Id: miscadmin.h,v 1.68 2000/10/08 09:25:38 ishii Exp $
1616
*
1717
* NOTES
1818
* some of the information in this file will be moved to
@@ -108,6 +108,7 @@ extern int SortMem;
108108

109109
extern bool NetServer;
110110
extern bool EnableSSL;
111+
extern bool SilentMode;
111112
extern int MaxBackends;
112113
extern int NBuffers;
113114
extern int PostPortName;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy