| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | jd(at)commandprompt(dot)com |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: A single escape required for log_filename |
| Date: | 2009-01-13 21:58:46 |
| Message-ID: | 2029.1231883926@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
"Joshua D. Drake" <jd(at)commandprompt(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Joshua D. Drake | 2009-01-13 22:05:14 | Re: A single escape required for log_filename |
| Previous Message | Joshua D. Drake | 2009-01-13 21:47:50 | Re: A single escape required for log_filename |