I’m using Postgres 9.5 on Ubuntu 14.04. I notice I’m generating a lot of Postgres logs in
/var/log/postgresql/postgresql-9.5-main.log
. I would like to limit the size of this file, and doing some time based rotation (e.g. daily) is not an option. Is there any way I can tell Postgres to rotate its logs once they reach a certain size?
Best Answer
The PostgreSQL Error reporting and logging documentation states:
So, I guess you should set this parameter to the desired value. My
postgresql.conf
option has the default values: