mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Replace log_filename_prefix with more general log_filename parameter,
to allow DBA to choose the form in which log filenames reflect the current time. Also allow for truncating instead of appending to pre-existing files --- this is convenient when the log filename pattern rewrites the same names cyclically. Per Ed L.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<!--
|
||||
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.279 2004/08/24 00:06:50 neilc Exp $
|
||||
$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.280 2004/08/31 04:53:43 tgl Exp $
|
||||
-->
|
||||
|
||||
<Chapter Id="runtime">
|
||||
@ -1925,14 +1925,21 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-log-filename-prefix" xreflabel="log_filename_prefix">
|
||||
<term><varname>log_filename_prefix</varname> (<type>string</type>)</term>
|
||||
<varlistentry id="guc-log-filename" xreflabel="log_filename">
|
||||
<term><varname>log_filename</varname> (<type>string</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When <varname>redirect_stderr</> is enabled, this option
|
||||
sets the prefix of the file names of the created log files.
|
||||
The postmaster PID and the current time are appended to this
|
||||
prefix to form an exact log file name.
|
||||
sets the file names of the created log files. The value
|
||||
is treated as a <systemitem>strftime</> pattern,
|
||||
so <literal>%</>-escapes
|
||||
can be used to specify time-varying file names.
|
||||
If no <literal>%</>-escapes are present,
|
||||
<productname>PostgreSQL</productname> will
|
||||
append the epoch of the new log file's open time. For example,
|
||||
if <varname>log_filename</> were <literal>server_log</>, then the
|
||||
chosen file name would be <literal>server_log.1093827753</>
|
||||
for a log starting at Sun Aug 29 19:02:33 2004 MST.
|
||||
This option can only be set at server start or in the
|
||||
<filename>postgresql.conf</filename> configuration file.
|
||||
</para>
|
||||
@ -1969,6 +1976,26 @@ archive_command = 'copy "%p" /mnt/server/archivedir/"%f"' # Win32
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-log-truncate-on-rotation" xreflabel="log_truncate_on_rotation">
|
||||
<term><varname>log_truncate_on_rotation</varname> (<type>boolean</type>)</term>
|
||||
<listitem>
|
||||
<para>
|
||||
When <varname>redirect_stderr</> is enabled, this option will cause
|
||||
<productname>PostgreSQL</productname> to truncate (overwrite),
|
||||
rather than append to, any existing log file of the same name.
|
||||
However, truncation will occur only when a new file is being opened
|
||||
due to time-based rotation, not during server startup or size-based
|
||||
rotation. When false, pre-existing files will be appended to in
|
||||
all cases. For example, using this option in combination with
|
||||
a <varname>log_filename</> like <literal>postgresql-%H.log</>
|
||||
would result in generating twenty-four hourly log files and then
|
||||
cyclically overwriting them.
|
||||
This option can only be set at server start or in the
|
||||
<filename>postgresql.conf</filename> configuration file.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="guc-syslog-facility" xreflabel="syslog_facility">
|
||||
<term><varname>syslog_facility</varname> (<type>string</type>)</term>
|
||||
<listitem>
|
||||
|
Reference in New Issue
Block a user