One of my former colleagues who happens to do heavy administrative work for a big university in Turkey recently sent an e-mail about a systems failure. I copy the e-mail here because it shows an interesting and strong case for why people prefer PostgreSQL over MySQL:
Today I learned something and I want to share it with the team:
Apparently, no matter what you do, systems always crash. Even if you:
– Use virtualization
– Configure your servers for high availability
– Do very tight security tuning
– Keep your software up to date
– Monitor your systems for failure prediction
– Use decent hardware
– Use a room-sized UPS together with a noisy generator
Your systems can crash anytime, and mother nature will use all of her resources to make sure that it will happen.
System crash always happens. Thats why the recovery procedure itself is at least as important as precautions to prevent a crash.
As some of you might notice, today our beloved Moodle was down for 2 hours. It all started with the failure of the air conditioner in our server room, but it was not the reason. The support staff who went to the server room to fix the air conditioner accidentally plugged out our rack’s main power line. Result: All systems were down. Luckily, they noticed it fast enough and we got power and all our services back in some time like 10 minutes.
Unfortunately, this power outage caused data corruption on our MySQL server. It took about 1.5 hours of work, lots of curse words and some wizardry to get the tables back in healthy state.
Although the data is now back in place, there is a slight possibility that some little piece of information might be lost. If you notice a situation like that, please contact me immediatly so that we can try to save your lost data.
Ah, and the lesson: Whatever you do for availability of your services, make sure that you don’t use software that corrupts your data when something really unexpected happens.
Or if you want to specialize it: DO NOT USE MYSQL FOR ANY MISSON CRITICAL SERVICE.
I learned my lesson and will be migrating our services from MySQL to PostgreSQL in the upcoming weeks.”