Restarting MySQLD when all transactions are complete

2009-01-14 Thread John Daisley
Hi,

Probably a simple question for someone who knows :)

Is there a way to force MySQLD to restart after it has finished processing
all current transactions?

I seem to remember from the bit of Oracle work I did in the past we could
do a Transactional Restart in Oracle 10g which caused the server to stop
accepting new requests and restart when it has processed all current
transactions. I now need to do a similar thing with MySQL 5.0, is this
possible?

It would also be handy if I could get it to do this 'transactional
retstart' and when it comes back up force the slave to do the same, but
we'll get one working first! Its needed so we can apply updates etc to the
box without disrupting database access.

Thanks in advance for any help.

Regards
John


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Restarting MySQLD when all transactions are complete

2009-01-14 Thread ceo

Read the mysqld man pages about what it does with kill -X signals.



One of them may mean graceful stop



Or not.



If there is one, you'd still have to figure out how to tie that into a re-boot 
or whatever for updates.



Sounds like a perfectly reasonable feature request if you find nothing at all...



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org



Re: Restarting MySQLD when all transactions are complete

2009-01-14 Thread ewen fortune
Hi,


On Wed, Jan 14, 2009 at 3:00 PM, John Daisley
john.dais...@mypostoffice.co.uk wrote:
 Hi,

 Probably a simple question for someone who knows :)

 Is there a way to force MySQLD to restart after it has finished processing
 all current transactions?

 I seem to remember from the bit of Oracle work I did in the past we could
 do a Transactional Restart in Oracle 10g which caused the server to stop
 accepting new requests and restart when it has processed all current
 transactions. I now need to do a similar thing with MySQL 5.0, is this
 possible?

Right, under Oracle you can do SHUTDOWN TRANSACTIONAL
There is no such command available with MySQL but you can do the
basically the same thing.

Reduce the max_connections variable to 1, this will prevent any new
non-super connections.
Optionally set the server to read_only to prevent any existing
non-super connections from initiating new updates.
View the processlist, once all the transactions have completed you can
kill the connections and issue a shutdown.


 It would also be handy if I could get it to do this 'transactional
 retstart' and when it comes back up force the slave to do the same, but
 we'll get one working first! Its needed so we can apply updates etc to the
 box without disrupting database access.


Its not exactly what oracle is doing, but at least you can control access.


Cheers,

Ewen

 Thanks in advance for any help.

 Regards
 John


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=ewen.fort...@gmail.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org