mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
log_destination should only be PGC_SIGHUP, not PGC_POSTMASTER, as per
discussion yesterday. Also a few improvements in the associated documentation.
This commit is contained in:
parent
cbcd8b5bec
commit
0655b26282
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.35 2004/05/16 19:34:46 momjian Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.36 2004/07/24 19:51:22 tgl Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<chapter id="maintenance">
|
<chapter id="maintenance">
|
||||||
@ -456,7 +456,7 @@ VACUUM
|
|||||||
The simplest production-grade approach to managing log output is to
|
The simplest production-grade approach to managing log output is to
|
||||||
send it all to <application>syslog</> and let
|
send it all to <application>syslog</> and let
|
||||||
<application>syslog</> deal with file rotation. To do this, set the
|
<application>syslog</> deal with file rotation. To do this, set the
|
||||||
configurations parameter <literal>log_destination</> to 'syslog' (to log to
|
configuration parameter <literal>log_destination</> to 'syslog' (to log to
|
||||||
<application>syslog</> only) in <filename>postgresql.conf</>. Then
|
<application>syslog</> only) in <filename>postgresql.conf</>. Then
|
||||||
you can send a <literal>SIGHUP</literal> signal to the
|
you can send a <literal>SIGHUP</literal> signal to the
|
||||||
<application>syslog</> daemon whenever you want to force it to
|
<application>syslog</> daemon whenever you want to force it to
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.269 2004/07/11 00:18:40 momjian Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.270 2004/07/24 19:51:22 tgl Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -1769,12 +1769,13 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<productname>PostgreSQL</productname> supports several methods
|
<productname>PostgreSQL</productname> supports several methods
|
||||||
for loggning, including <systemitem>stderr</systemitem> and
|
for logging server messages, including
|
||||||
|
<systemitem>stderr</systemitem> and
|
||||||
<systemitem>syslog</systemitem>. On Windows,
|
<systemitem>syslog</systemitem>. On Windows,
|
||||||
<systemitem>eventlog</systemitem> is also supported. Set this
|
<systemitem>eventlog</systemitem> is also supported. Set this
|
||||||
option to a list of desired log destinations separated by a
|
option to a list of desired log destinations separated by
|
||||||
comma. The default is to log to <systemitem>stderr</systemitem>
|
commas. The default is to log to <systemitem>stderr</systemitem>
|
||||||
only. This option must be set at server start.
|
only.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1783,15 +1784,16 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<term><varname>syslog_facility</varname> (<type>string</type>)</term>
|
<term><varname>syslog_facility</varname> (<type>string</type>)</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This option determines the <application>syslog</application>
|
If logging to <application>syslog</> is enabled, this option
|
||||||
<quote>facility</quote> to be used when logging via
|
determines the <application>syslog</application>
|
||||||
<application>syslog</application> is enabled. You may choose
|
<quote>facility</quote> to be used. You may choose
|
||||||
from <literal>LOCAL0</>, <literal>LOCAL1</>,
|
from <literal>LOCAL0</>, <literal>LOCAL1</>,
|
||||||
<literal>LOCAL2</>, <literal>LOCAL3</>, <literal>LOCAL4</>,
|
<literal>LOCAL2</>, <literal>LOCAL3</>, <literal>LOCAL4</>,
|
||||||
<literal>LOCAL5</>, <literal>LOCAL6</>, <literal>LOCAL7</>;
|
<literal>LOCAL5</>, <literal>LOCAL6</>, <literal>LOCAL7</>;
|
||||||
the default is <literal>LOCAL0</>. See also the
|
the default is <literal>LOCAL0</>. See also the
|
||||||
documentation of your system's
|
documentation of your system's
|
||||||
<application>syslog</application>.
|
<application>syslog</application> daemon.
|
||||||
|
This option can only be set at server start.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1803,8 +1805,9 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
If logging to <application>syslog</> is enabled, this option
|
If logging to <application>syslog</> is enabled, this option
|
||||||
determines the program name used to identify
|
determines the program name used to identify
|
||||||
<productname>PostgreSQL</productname> messages in
|
<productname>PostgreSQL</productname> messages in
|
||||||
<application>syslog</application> log messages. The default is
|
<application>syslog</application> logs. The default is
|
||||||
<literal>postgres</literal>.
|
<literal>postgres</literal>.
|
||||||
|
This option can only be set at server start.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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,
|
{"log_destination", PGC_SIGHUP, LOGGING_WHERE,
|
||||||
gettext_noop("Sets the target for log output."),
|
gettext_noop("Sets the destination for server log output."),
|
||||||
gettext_noop("Valid values are combinations of stderr, syslog "
|
gettext_noop("Valid values are combinations of stderr, syslog "
|
||||||
"and eventlog, depending on platform."),
|
"and eventlog, depending on platform."),
|
||||||
GUC_LIST_INPUT
|
GUC_LIST_INPUT
|
||||||
@ -5099,15 +5099,12 @@ assign_log_destination(const char *value, bool doit, GucSource source)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doit)
|
||||||
|
Log_destination = newlogdest;
|
||||||
|
|
||||||
pfree(rawstring);
|
pfree(rawstring);
|
||||||
list_free(elemlist);
|
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;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user