/var/log/postgresql {
    # Append time and date to file
    dateext
    dateformat .%Y_%m_%d-%ss
    size 100M
    rotate 4
    missingok
    create 640 root dosis
    postrotate
    /bin/kill -HUP $(cat /var/run/syslogd.pid 2> /dev/null) 2> /dev/null || true
    endscript
}

/var/log/postgresql/*.log {
    size 100M
    rotate 4
    copytruncate
    delaycompress
    compress
    notifempty
    missingok
    create 640 root dosis
}
