Hi, We support several methods for logging server messages. The "native" methods (stderr, csvlogs) has poor management. We can't compress logs, send them to another location/server, or just remove old ones. Another problem is that we can't remove (automatically) old logs based on the number of existing log files (of course we can do it using log_truncate_on_rotation and a log_filename that matches the number of files -- but it *isn't* flexible). The other log management softwares have a way to do that so why our logger doesn't have such capability?
I want to propose a new command to be execute after the log file is rotated. A GUC parameter log_after_rotation_command that takes a (set of) command(s) that will be executed after a log file is rotated. It should be set only by superuser. For example: # compress and store the log file in another location log_after_rotation_command = 'gzip %f && mv %p.gz /a/mylogs' Depending on the comments, I will clean up the patch and send it later today. -- Euler Taveira de Oliveira http://www.timbira.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers