diff --git a/postgresql/files/logrotate_postgresql b/postgresql/files/logrotate_postgresql index cfecbcf3..a9306aa3 100644 --- a/postgresql/files/logrotate_postgresql +++ b/postgresql/files/logrotate_postgresql @@ -1,7 +1,11 @@ /var/log/postgresql/*.log { daily - missingok rotate 10 - create 640 postgres adm + copytruncate + nodelaycompress + compress + notifempty + missingok + su root root } diff --git a/postgresql/tasks/logrotate.yml b/postgresql/tasks/logrotate.yml index e77347d8..f67f407a 100644 --- a/postgresql/tasks/logrotate.yml +++ b/postgresql/tasks/logrotate.yml @@ -2,5 +2,5 @@ - name: logrotate configuration copy: src: logrotate_postgresql - dest: /etc/logrotate.d/postgresql + dest: /etc/logrotate.d/postgresql-common force: no