News for hackers. Stuff that matters.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by niftich on Tuesday September 13, 2016 @12:40PM (#12489936)
So having read through the slides, these are not bad slides, but I'm missing the 'real' wow-factor of why Postgres was a better choice in the end than Oracle. There's no doubt that the rewrite (which, because of PL/SQL -> PL/pgSQL, there was a rewrite) benefited them, but all I can glean from the slides is Postgres hasn't failed them yet and the rewrite worked.

So as much as I want to talk about Oracle vs. Postgres, these slides aren't giving me anything technical to debate.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by postila on Tuesday September 13, 2016 @12:50PM (#12490049)
1. Price if obvious reason of migration, and in their case (multiple datacenters and "-1 datacenter" policy) it was huge benefit.

2. The other concern was Oracle's slow bugfixing and reaction to feedback.

So, this is a good case showing how a company can stop wasting millions of $ for proprietary software, joining Open Source community, contributing to it and taking benefits from tech collaboration with core developers of the product.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by niftich on Tuesday September 13, 2016 @12:58PM (#12490122)
So, they say 'shop.oracle.com' was their 'main reason' for switching but that reads as a half-joke, half-serious riff on Oracle's famous ability to extract money from people; the other salient points I can find are:

- PL/SQL was harder to deploy than PL/pgSQL (as stated later)

- Only synchronous interface in Oracle's OCCI

- Problems with Oracle's development environments

- Not very responsive support from Oracle.

But the dev environment and support for Postgres are not talked about.

Also I can't quite figure out if "3x more hardware" is supposed to be a good thing on their last slide. It's possible that it's a good thing (if it's, say, we can replicate to more servers), but to me it doesn't read like one.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by postila on Tuesday September 13, 2016 @01:09PM (#12490228)
Details were in the talk itself, watch the video https://www.youtube.com/watch?v=-SS4R1sFH3c. In particular, they mentioned how Tom Lane fixed a bug they found and did it just in 38 minutes.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by elmigranto on Tuesday September 13, 2016 @03:17PM (#12491343)
> I can't quite figure out if "3x more hardware" is supposed to be a good thing

Initial architecture with 2 servers was set up that way to save money on Oracle per-core licensing. They wanted to add more, but that was too costly.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by okket on Tuesday September 13, 2016 @12:55PM (#12490092)
> I'm missing the 'real' wow-factor of why Postgres was a better choice in the end than Oracle

Not having to deal with stuff like this while having the same features/performance/stability/etc may qualify as a 'wow':

http://www.orafaq.com/wiki/Oracle_licensing

Re:Yandex.Mail's successful migration from Oracle to Postgre... by imron on Tuesday September 13, 2016 @12:55PM (#12490086)
> but I'm missing the 'real' wow-factor of why Postgres was a better choice in the end than Oracle

I'm guessing it was a few million dollars worth of wow-factor.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by fla on Tuesday September 13, 2016 @12:45PM (#12490004)
Postgres is free
Re:Yandex.Mail's successful migration from Oracle to Postgre... by syncsynchalt on Tuesday September 13, 2016 @02:27PM (#12490971)
10 man-years are not though.

I'm a postgres fan and booster myself but I'd need a good reason to migrate a data backend on any project I'm managing.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by tw04 on Tuesday September 13, 2016 @11:19PM (#12494037)
I don't think you realize just how painfully expensive Oracle is. The reason they only went with an active/passive server layout vs. going active/active/active RAC is because they would've had to move to enterprise licensing. Then you're talking (at what I imagine their scale is) 7-8 figures a year.

http://www.oracle.com/us/corporate/contracts/processor-core-...

So if you look at just enterprise licensing, it's $47k per "processor" - which in their world, a single intel core counts as 0.5 processors. So if you've got a 36 core machine (which I think they mentioned in the video) that's 18 "processors". Or $846,000 for one box. You want clustering (RAC) - that's another $315,000. Partitioning? $207,000. So now we're up to ~$1.4 million for a single server. YAY!

Obviously these are list prices, so you should be paying less than that, but it gets ugly FAST.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by elmigranto on Tuesday September 13, 2016 @03:21PM (#12491364)
> 10 man-years are not though.

Judging by the salaries from job sites and my yandex interview, the cost would most certainly top up at $0.5 million (that's a very generous guess, probably half or two thirds that, realistically). Not sure how much Oracle costs at Yandex scale (a LOT more?).

Re:Yandex.Mail's successful migration from Oracle to Postgre... by spydum on Tuesday September 13, 2016 @09:28PM (#12493631)
Am I missing something? How do you figure 10 man years = $500K ? Or is Yandex super stingy? DBAs and Developers worth their salt (who could pull off a multi-TB migration/etc without significant outage), would easily each go for $140K/yr minimum (so, 180-200K fully loaded with benefits and such).

Still though: your point is valid in that, Oracle RAC cluster licensing and support is serious bucks.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by postila on Tuesday September 13, 2016 @11:15PM (#12494024)
Yes, you're missing the fact that it's Russia, not SV.

Couple of years ago ruble's exchange rates dropped significantly (it was ~33RUR for USD, now it's 64-65 rubles).

Monthly salaries for a good engineer in Moscow are usually 100-200k rubles, or 1.2-2.4M rubles/year.

It's only $18-36k per year. Looks insane from typical californian HR's point of view, isn't it?

Taxes take additional ~50% (in Russia, employer pays all the taxes and payments to the pension fund), so $500k was a pretty good estimate.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by meshko on Tuesday September 13, 2016 @11:50PM (#12494135)
it wouldn't have been 10 man years if they had less PL/SQL. I don't understand why people keep falling into that trap of putting complex logic in stored procedures.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by d0uble on Wednesday September 14, 2016 @04:54AM (#12495065)
No, you are not right. In video (Q&A section in the end) you can hear that rewriting stored logic took a couple of weeks of one developer. Maybe a couple of month with good tests.

It took much more time to rewrite backends logic because of lots of legacy code in many applications without using abstraction libraries.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by meshko on Wednesday September 14, 2016 @01:59PM (#12499587)
Oh, cool. Can you expand on that? What kind of logic had to change? I mean, SQL queries are SQL queries? Is that because you were using low level C Oracle drivers of some sort? Also if you could say a couple of words about the MySQL failure it would be rather helpful because I might have a friend who might be currently deciding on whether to migrate to MySQL or Postgres from Oracle.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by d0uble on Thursday September 15, 2016 @03:49AM (#12504183)
We had several kinds of stored logic in Oracle: 1. for logical consistency of data (i.e. when you store new message you should increment counter for folder, thread, etc.). It seems correct to have such logic in the database rather than in the application. 2. for common code (i.e. moving a message from one folder to another may be done from web backend, mobile backend, imap backend or pop3 backend). This kind of logic is easier to have in one place than in all backends. 3. some business logic (i.e. finding thread for a new incoming message was done in PL/SQL).

First type is still in the database. Some part of type 2 was moved to our abstraction library (that is used by all applications). Logic of thrird type was moved to our applications and it greatly reduced stored code size.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by d0uble on Thursday September 15, 2016 @03:52AM (#12504193)
About failed attempt of moving to MySQL. It was more than 10 years ago and I wasn't working at Yandex at that time but AFAIK the main problems were not around technical problems, they were organizational - not all members of the team agreed on moving to MySQL.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by Shorel on Tuesday September 13, 2016 @01:53PM (#12490662)
> but all I can glean from the slides is Postgres hasn't failed them yet and the rewrite worked

That's actually huge for companies that have invested in Oracle and feel trapped.

And the companies that buy Oracle, have a slight tendency to write all their core business logic inside the database.

Re:Yandex.Mail's successful migration from Oracle to Postgre... by zepolen on Tuesday September 13, 2016 @01:56PM (#12490693)
Which is really the best place to put it in the end.
Re:Yandex.Mail's successful migration from Oracle to Postgre... by insertnickname on Tuesday September 13, 2016 @01:17PM (#12490307)
Re:Yandex.Mail's successful migration from Oracle to Postgre... by postila on Tuesday September 13, 2016 @11:32PM (#12494075)
oh, it was a pretty funny message. Official one! With huge amount of grammar errors in Russian text :-)
Re:Yandex.Mail's successful migration from Oracle to Postgre... by imaginenore on Tuesday September 13, 2016 @01:39PM (#12490517)
Oracle licensing costs are ridiculous.