Workaround:
Delete the old postgresql.log-0#.gz log files and it will continue rotating.
If it does not continue rotating,
Update /etc/logrotate.d/vmware_postgres_log
to this,
/var/log/vmware/vpostgres/postgresql.log {
firstaction
dim=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d)
find /var/log/vmware/vpostgres/ -name "postgresql.log-*gz" -mtime +$dim -exec rm {} \;
endscript
daily
rotate 30
maxage 30
dateext
dateyesterday
dateformat -%Y-%m-%d_%H:%M:%S
compress
copytruncate
}
Update /etc/logrotate.d/vmware_vtsdb_postgres_log
to this, ( This file can be found on VCSA 8.x only)
/var/log/vmware/vtsdb/postgresql.log {
firstaction
dim=$(date -d "$(date +%Y-%m-01) +1 month -1 day" +%d)
find /var/log/vmware/vtsdb/ -name "postgresql.log-*gz" -mtime +$dim -exec rm {} \;
endscript
daily
rotate 30
maxage 30
dateext
dateyesterday
dateformat -%Y-%m-%d_%H:%M:%S
compress
copytruncate
}
No other action should be needed as the cron job will run every hour.