Bernstein's multilog program (part of the daemontools package) may be useful. It is designed to read input from standard input and will do log rotation. Documentation is available at: http://cr.yp.to/daemontools/multilog.html
pgsql-admin by date:
Соглашаюсь с условиями обработки персональных данных