Skip to content

Commit 0655b26

Browse files
committed
log_destination should only be PGC_SIGHUP, not PGC_POSTMASTER, as per
discussion yesterday. Also a few improvements in the associated documentation.
1 parent cbcd8b5 commit 0655b26

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

doc/src/sgml/maintenance.sgml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.35 2004/05/16 19:34:46 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.36 2004/07/24 19:51:22 tgl Exp $
33
-->
44

55
<chapter id="maintenance">
@@ -456,7 +456,7 @@ VACUUM
456456
The simplest production-grade approach to managing log output is to
457457
send it all to <application>syslog</> and let
458458
<application>syslog</> deal with file rotation. To do this, set the
459-
configurations parameter <literal>log_destination</> to 'syslog' (to log to
459+
configuration parameter <literal>log_destination</> to 'syslog' (to log to
460460
<application>syslog</> only) in <filename>postgresql.conf</>. Then
461461
you can send a <literal>SIGHUP</literal> signal to the
462462
<application>syslog</> daemon whenever you want to force it to

doc/src/sgml/runtime.sgml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.269 2004/07/11 00:18:40 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.270 2004/07/24 19:51:22 tgl Exp $
33
-->
44

55
<Chapter Id="runtime">
@@ -1769,12 +1769,13 @@ SET ENABLE_SEQSCAN TO OFF;
17691769
<listitem>
17701770
<para>
17711771
<productname>PostgreSQL</productname> supports several methods
1772-
for loggning, including <systemitem>stderr</systemitem> and
1772+
for logging server messages, including
1773+
<systemitem>stderr</systemitem> and
17731774
<systemitem>syslog</systemitem>. On Windows,
17741775
<systemitem>eventlog</systemitem> is also supported. Set this
1775-
option to a list of desired log destinations separated by a
1776-
comma. The default is to log to <systemitem>stderr</systemitem>
1777-
only. This option must be set at server start.
1776+
option to a list of desired log destinations separated by
1777+
commas. The default is to log to <systemitem>stderr</systemitem>
1778+
only.
17781779
</para>
17791780
</listitem>
17801781
</varlistentry>
@@ -1783,15 +1784,16 @@ SET ENABLE_SEQSCAN TO OFF;
17831784
<term><varname>syslog_facility</varname> (<type>string</type>)</term>
17841785
<listitem>
17851786
<para>
1786-
This option determines the <application>syslog</application>
1787-
<quote>facility</quote> to be used when logging via
1788-
<application>syslog</application> is enabled. You may choose
1787+
If logging to <application>syslog</> is enabled, this option
1788+
determines the <application>syslog</application>
1789+
<quote>facility</quote> to be used. You may choose
17891790
from <literal>LOCAL0</>, <literal>LOCAL1</>,
17901791
<literal>LOCAL2</>, <literal>LOCAL3</>, <literal>LOCAL4</>,
17911792
<literal>LOCAL5</>, <literal>LOCAL6</>, <literal>LOCAL7</>;
17921793
the default is <literal>LOCAL0</>. See also the
17931794
documentation of your system's
1794-
<application>syslog</application>.
1795+
<application>syslog</application> daemon.
1796+
This option can only be set at server start.
17951797
</para>
17961798
</listitem>
17971799
</varlistentry>
@@ -1803,8 +1805,9 @@ SET ENABLE_SEQSCAN TO OFF;
18031805
If logging to <application>syslog</> is enabled, this option
18041806
determines the program name used to identify
18051807
<productname>PostgreSQL</productname> messages in
1806-
<application>syslog</application> log messages. The default is
1808+
<application>syslog</application> logs. The default is
18071809
<literal>postgres</literal>.
1810+
This option can only be set at server start.
18081811
</para>
18091812
</listitem>
18101813
</varlistentry>

src/backend/utils/misc/guc.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.223 2004/07/21 20:34:46 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.224 2004/07/24 19:51:23 tgl Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -1625,8 +1625,8 @@ static struct config_string ConfigureNamesString[] =
16251625
},
16261626

16271627
{
1628-
{"log_destination", PGC_POSTMASTER, LOGGING_WHERE,
1629-
gettext_noop("Sets the target for log output."),
1628+
{"log_destination", PGC_SIGHUP, LOGGING_WHERE,
1629+
gettext_noop("Sets the destination for server log output."),
16301630
gettext_noop("Valid values are combinations of stderr, syslog "
16311631
"and eventlog, depending on platform."),
16321632
GUC_LIST_INPUT
@@ -5099,15 +5099,12 @@ assign_log_destination(const char *value, bool doit, GucSource source)
50995099
}
51005100
}
51015101

5102+
if (doit)
5103+
Log_destination = newlogdest;
5104+
51025105
pfree(rawstring);
51035106
list_free(elemlist);
51045107

5105-
/* If we aren't going to do the assignment, just return OK indicator. */
5106-
if (!doit)
5107-
return value;
5108-
5109-
Log_destination = newlogdest;
5110-
51115108
return value;
51125109
}
51135110

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