Jul 10
14
A new book for MySQL, and a toolkit for MySQL AND PostgreSQL
So I came across a new book on MySQL replication, which looks pretty useful although a little expensive. The author biographies are particularly impressive – these are the guys who really should know about replication. One of those is the architect of MySQL’s row-based replication which set me thinking.
A while back I was implementing replication on a couple of DCM4CHEE servers and noticed that the master and slave became increasingly out of sync. At the time, the only option in MySQL was statement-based replication and I attributed (with no real evidence) the issue to known limitations of that form of replication. In any case – the alternative (DRBD) turned out to be quite adequate and that is the strategy I’ve used since.
However, more recently (November 2008), MySQL 5.1 included row-based replication and I never went back to review the strategy. Seeing this new book prompted me to spend a little time checking what the state of MySQL row-based replication is.
To cut a long story short, I ended up discovering Maatkit – “power tools for open source databases”, which, while written primarily with MySQL in mind, supports other open source databases (like PostgreSQL for example) and is certainly going to join the rest of my arsenal. The first use will be mk-table-checksum – designed to allow comparison of master and slave to ensure replication consistency.
I’ll try out the row-level locking and will a new toolset, can be comfortable that it works the way it should (or indeed, not).
BTW the O’Reilly site has a sample chapter which describes nicely the process of setting up simple replication – worth a look if you haven’t tried it before.