PostgreSQL log rotation 설정


postgresql.conf 수정

log_directory = '/var/applog/pg_log/1921'
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
log_truncate_on_rotation = on
log_rotation_age = 1d

config reload

SELECT pg_reload_conf();