From: Paul B. H. <he...@ac...> - 2007-02-03 00:38:27
|
I'm setting up sqlgrey with a dual server multi-master mysql replication configuration. I wanted it to be able to failover between the two database servers, both of which are read/write. The write remotely, read locally clustering didn't really seem like it would do what I wanted. The attached patch adds a new configuration directive, db_hostlist, which takes a list of one or more database servers (presumably more than one, or one could just use db_host). If this directive is defined, sqlgrey will rotate between the listed hosts every time it has to try and reconnect to the database. Also, the patch moves the logging of the database error to before the call to db_unavailable(). For some reason, DBI::errstr lost its value during the call to db_unavailable(), and with the logging message afterwards, no error was printed. -- Paul B. Henson | (909) 979-6361 | http://www.csupomona.edu/~henson/ Operating Systems and Network Analyst | he...@cs... California State Polytechnic University | Pomona CA 91768 |