On Friday April 4 2003 9:16, scott.marlowe wrote:
> That said, a log rotation capability built right into pg_ctl or
> thereabouts would be a very nice feature.  I.e. 'pg_ctl -r 86400 -l
> $PGDATA/logs/pgsql start'
> where -r is the rotation period in seconds.  If it's an external program
> that pg_ctl calls that's fine, and it could even just be a carbon copy of
> apache's log rotater if their license is compatible (isn't it?)

By way of feature ideas, one very convenient but not widely used feature of 
Apache's log rotator is the ability to specify a strftime() format string 
for the file extension.  For example, if I want to have my logs rollover 
every 24 hours and be named log.Mon, log.Tue, log.Wed, I say something like

        pg_ctl start | rotatelogs 86400 "%a"

This causes the logs to overwrite themselves every seven days, taking log 
maintenance time to very near zero.  We also customized our use of it to 
allow us to automatically move existing logs out of the way to "log.1", 
"log.2", or to simply overwrite existing logs.


---------------------------(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