This patch updates log rotation documentation:
        + Removed false statement that log_filename can only be changed on restart 
(it is reloadable via sighup);
        + Added a couple of examples;
        + Cleaned up a few smgl tags;
Index: runtime.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/runtime.sgml,v
retrieving revision 1.280
diff -C1 -r1.280 runtime.sgml
*** runtime.sgml	31 Aug 2004 04:53:43 -0000	1.280
--- runtime.sgml	17 Sep 2004 21:14:56 -0000
***************
*** 1931,1945 ****
          <para>
!           When <varname>redirect_stderr</> is enabled, this option
            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>
--- 1931,1959 ----
          <para>
!           When <varname>redirect_stderr</varname> is enabled, this option
            sets the file names of the created log files.  The value
!           is treated as a <systemitem>strftime</systemitem> pattern,
!           so <literal>%</literal>-escapes
            can be used to specify time-varying file names.
!           If no <literal>%</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</varname> were <literal>server_log</literal>, then the
!           chosen file name would be <literal>server_log.1093827753</literal>
!           for a log starting Sun Aug 29 19:02:33 2004 MST.
!         </para>
!         <para>
!           Example:  To keep 7 days of logs, one log file per day named
!           <literal>server_log.Mon</literal>, <literal>server_log.Tue</literal>, 
!           etc, and automatically overwrite last week's log with this week's log,
!           set <varname>log_filename</varname> to <literal>server_log.%a</literal>, 
!           <varname>log_truncate_on_rotation</varname> to <literal>true</literal>, and 
!           <varname>log_rotation_age</varname> to <literal>1440</literal>.
!         </para>
!         <para>
!           Example: To keep 24 hours of logs, one log file per hour, but 
!           also rotate sooner if the log file size exceeds 1GB, set 
!           <varname>log_filename</varname> to <literal>server_log.%H%M</literal>, 
!           <varname>log_truncate_on_rotation</varname> to <literal>true</literal>, 
!           <varname>log_rotation_age</varname> to <literal>60</literal>, and 
!           <varname>log_rotation_size</varname> to <literal>1000000</literal>.
          </para>
***************
*** 1952,1954 ****
          <para>
!           When <varname>redirect_stderr</> is enabled, this option
            determines the maximum lifetime of an individual log file.
--- 1966,1968 ----
          <para>
!           When <varname>redirect_stderr</varname> is enabled, this option
            determines the maximum lifetime of an individual log file.
***************
*** 1967,1969 ****
          <para>
!           When <varname>redirect_stderr</> is enabled, this option
            determines the maximum size of an individual log file.
--- 1981,1983 ----
          <para>
!           When <varname>redirect_stderr</varname> is enabled, this option
            determines the maximum size of an individual log file.
***************
*** 1982,1984 ****
          <para>
!           When <varname>redirect_stderr</> is enabled, this option will cause
            <productname>PostgreSQL</productname> to truncate (overwrite),
--- 1996,1998 ----
          <para>
!           When <varname>redirect_stderr</varname> is enabled, this option will cause
            <productname>PostgreSQL</productname> to truncate (overwrite),
***************
*** 1989,1991 ****
            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
--- 2003,2005 ----
            all cases.  For example, using this option in combination with
!           a <varname>log_filename</varname> like <literal>postgresql-%H.log</literal>
            would result in generating twenty-four hourly log files and then
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to