I have a little problem and I need your help please. Here is the story : I have Percona Server in version 8.0.13 with one slave and the old binlogs on master are not deleted automatically when flush-logs appending. Variables are set as :
# mysql -e"select @@expire_logs_days, @@binlog_expire_logs_seconds"
+--------------------+------------------------------+
| @@expire_logs_days | @@binlog_expire_logs_seconds |
+--------------------+------------------------------+
| 0 | 86400 |
+--------------------+------------------------------+
I have logrotate which execute mysqladmin flush-logs
every night and binlogs are correctly rotated but old ones are not removed. When I execute this command manually the behaviour is the same.
In MySQL CLI the command PURGE BINARY LOGS BEFORE datetime
works fine.
The slave replication is up to date or a little bit late but not more than a couple hour. So it can't be explain why old binlogs are still present on disks (some are 7 days old by example)
I also execute lsof
to check if MySQL retain descriptor on old binlogs but no. I have no more idea to explain the problem.
Do you have any ideas to explain and fix this please ?
Thanks,