3 ms·
Great write up. A couple points - I'm not sure this post is illustrative of any generally applicable considerations (re: the title) in the choice of Postgresql
by forgotpwtomain 10y ago
Great write up. A couple points -
I'm not sure this post is illustrative of any generally applicable considerations (re: the title) in the choice of Postgresql vs MySQL, since Uber seems to no longer be using a relational model for most of their data and is using MySQL effectively as a key-value store.
> say a developer has some code that has to email a receipt to a user. Depending on how it’s written, the code may implicitly have a database transaction that’s held open until after the email finishes sending. While it’s always bad form to let your code hold open database transactions while performing unrelated blocking I/O, the reality is that most engineers are not database experts and may not always understand this problem, especially when using an ORM that obscures low-level details like open transactions.
I have to very seriously disagree here, ORMs make a lot of things easy - and you can get away with building stuff for a while without understanding the underlying databases or SQL but only to a certain scale (I'd say more like medium-scale, definitely not large or Uber level). If you have engineers writing code that interacts with a database without understanding transactional semantics, the engineer in question not the database is the problem.
> We started out with Postgres 9.1 and successfully completed the upgrade process to move to Postgres 9.2. However, the process took so many hours that we couldn’t afford to do the process again.
There seem to be ways [0][1] to do online upgrades with Postgres (before logical decoding in 9.4), although I haven't personally used them. Not sure if they explored these options at Uber or not?
[0] https://github.com/markokr/skytools https://github.com/markokr/skytools
[1] http://slony.info/ http://slony.info/
- spotman 10y ago> I have to very seriously disagree here, ORMs In spirit I agree with you, its the engineer's fault for not reading the documentation of their ORM or equivalent. But in these big ships with hundreds of programmers, leaving transactions open in hibernate is a daily occurrence somewhere. Usually caught before production, but happens oh-so-frequently, that anything that exacerbates the pain from this would be seen in a negative light for sure.