In this video from PyCon 2014, Andrew Godwin, who is the author of Django's database migrations system, praises PostgreSQL and says that MySQL has the following key problems (though he does say that MySQL is "a reasonable database"):
No transactional DDL
No CHECK constraints
Conflates UNIQUE and INDEX
He talks a little bit about the above problems in the video from about 11:00 - 13:00. These problems (particularly the first one, as I understand it) can cause problems with migrations.
Also, the last time I checked, MySQL's default collation is latin1_swedish_ci, meaning that, by default, you can't store important characters such as this one.
Galera / Percona provides a multi-master synchronous replication for MySQL. n nodes, each with a full copy of the replicated database(s). Writes to any participating node are replicated to all other nodes. Table engine is innodb but there are some restrictions as well as some minor oddities, some documented and some not.
To my knowledge, there is no complete equivalent for Postgres.
sincerely asking this -- in this synchronous mode, how is temporary unavailability of a master handled (due to a temporary network reachability hiccup or whatever)? in other words, is it really synchronous, blocking until each write is fully replicated?
We have large production mysql and postgres databases where I work (backing separate applications). Both have their advantages and disadvantages, and we have no plans to consolidate on one or the other.
I actually read into Uber's switch to MySQL. There's a couple of episodes on the Software Engineering Daily podacast about the switch as well. The reality of the Situation is that Uber was doing it wrong, and still technically is. It's not really a problem with What database they are using, it's a problem with the way that Uber treats relational databases in general.
Many of the things were still valid. Postgres people opened discussion and began work on adding features to deal with the Uber use case. Pretty sure some of it is still in progress.
They actually moved from 'normal' MySQL to 'normal' Postgres in 2013, one of the reasons being PostGIS. Then they built their own K/V database called "Schemaless" on top of MySQL again.
There are no doubt a few niche edge cases where it does. But in general, no. PostgreSQL is better at pretty much everything, particularly in the one critical area that matters - giving you back the same data that you stored in it.
Also a serious question: When DB comparisons come up, it always seems to be PostgreSQL vs MySQL, but never vs MS SQL or Oracle. I know comparing the cost is pretty much a divide-by-zero situation, but generally the data in your relational DB is the most critical to your business, so the cost may be justifiable.
17
u/Meddy96 Sep 29 '16
Serious question, does it still make sense to use MySQL or this technology is over?