PostgreSQL version:

log_rotation_age

When logging_collector is enabled, this parameter determines the maximum lifetime of an individual log file. After this many minutes have elapsed, a new log file will be created. Set to zero to disable time-based creation of new log files. This parameter can only be set in the postgresql.conf file or on the server command line.

Recommendations

1d is generally good for production. Set to 1h to rotate logs hourly when doing performance analysis.

Comments