Hi,

The system variable expire_logs_days removes the binary logs automatically after the given number of days. The default is 0, which means "no automatic removal." Possible removals happen at startup and at binary log rotation. For transactions, it never causes rotation instead it writes to memory cache. The Autocommit statement and HAVE_REPLICATION symbol have impact over expire_logs_days.

As of our understanding, for transactions, if log file size as 100MB, and once it get filled, if thre any new log commit, then the log files content will be removed from begining until the required size is obtained and the new log is appended at the end (FIFO).

For more information on this variable,
http://bugs.mysql.com/bug.php?id=15580
http://bugs.mysql.com/bug.php?id=7236


Thanks
ViSolve DB Team.
----- Original Message ----- From: "George Law" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Thursday, October 19, 2006 12:16 AM
Subject: bin-log with expire_logs_days


Hi All,

I have a **high traffic** mysql 4.0.18-standard-log server running with
bin-logging enabled.

Right now, this must be using a default setting for expire_log_days.  I
do not see this anyway in
"show variables" or "show status"


$ echo "show variables" | sql |grep bin
binlog_cache_size       32768
log_bin ON
max_binlog_cache_size   4294967295
max_binlog_size 1073741824


# echo "show status" | sql |grep bin
Com_show_binlog_events  0
Com_show_binlogs        9

Right now, I have 132 bin-logs, each at 1 GB. the logs go back to
2/11/2006

If I were to add 'expire_logs_days 45' to my.cnf and restart mysql, is
mysql going to attempt to purge the logs
45 days old and if so... how long does it typically take.  We cannot
afford to restart if its going to take
any significant amount of time for it to purge the logs and restart.

thanks!


George Law
[EMAIL PROTECTED]
MSN: [EMAIL PROTECTED]
Phone: 864-678-3161


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to