Re: A single escape required for log_filename - Mailing list pgsql-hackers

From Tom Lane
Subject Re: A single escape required for log_filename
Date
Msg-id 2029.1231883926@sss.pgh.pa.us
Whole thread Raw
In response to Re: A single escape required for log_filename  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: A single escape required for log_filename  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: A single escape required for log_filename  (Stephen Frost <sfrost@snowman.net>)
Re: A single escape required for log_filename  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> I have perfectly good log rotation utility that exists on my OS. (yes I
> am aware of the possibility of losing a log entry when using logrotate).

You might think you do, but it won't work with PG; external rotators
only work with programs that respond to SIGHUP by re-opening their log
files.

> The behavior does not appear to be documented in the code or in the
> docs.

Don't know where you looked ...

log_filename (string)

When logging_collector is enabled, this parameter sets the file names of
the created log files. The value is treated as a strftime pattern, so
%-escapes can be used to specify time-varying file names. (Note that if
there are any time-zone-dependent %-escapes, the computation is done in
the zone specified by log_timezone.) If no %-escapes are present,
PostgreSQL will append the epoch of the new log file's creation
time. For example, if log_filename were server_log, then the chosen file
name would be server_log.1093827753 for a log starting at Sun Aug 29
19:02:33 2004 MST. This parameter can only be set in the postgresql.conf
file or on the server command line.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: A single escape required for log_filename
Next
From: "Joshua D. Drake"
Date:
Subject: Re: A single escape required for log_filename