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

From Andrew Dunstan
Subject Re: A single escape required for log_filename
Date
Msg-id 496D1758.5080703@dunslane.net
Whole thread Raw
In response to Re: A single escape required for log_filename  (Stephen Frost <sfrost@snowman.net>)
Responses Re: A single escape required for log_filename  (Gregory Stark <stark@enterprisedb.com>)
Re: A single escape required for log_filename  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers

Stephen Frost wrote:
> Joshua,
>
> * Joshua D. Drake (jd@commandprompt.com) wrote:
>   
>> When I set it up, it automatically appended the time so I got:
>>
>> postgresql.log.1231878270
>>
>> That seems a bit, well wrong. If I say I want postgresql.log I should
>> get postgresql.log.
>>
>> Or am I completely cranked?
>>     
>
> No.  I agree with you completely.  I'm also well versed in the
> requirements of log handling and log rotation.  Debian handles this by
> passing a '-l' to pg_ctl (usually
> /var/log/postgresql/postgresql-X.Y-CLUSTER.log), rotation is handled
> by logrotate.
>
>   

Then Debian is (surprise!) not doing the smartest thing. Not using the 
logging collector means you miss several possible advantages, including 
CSV logs and protection against multiplexed log lines.

Surely a good log rotator allows a custom rotation action (in this case, 
connecting to postgres and calling 'select pg_rotate_logfile()' )


cheers

andrew


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: So, what locale should the regression tests run in?
Next
From: Alvaro Herrera
Date:
Subject: reloptions with a "namespace"