How Swat.io migrated from MySQL to PostgreSQL in 2 years
garage.socialisten.at
garage.socialisten.at
As a general observation, "morality" (eg moral values) might be the wrong word there. Guessing you're meaning "morale" (?), which is more like "how happy our team members are".
That minor nitpick aside though, thanks for sharing. :)
> Still, over time every new internal project pretty soon begged the question...
You probably mean "raised the question". Begging the question is a type of logical fallacy[0].
[0] http://www.nizkor.org/features/fallacies/begging-the-questio...
Very weird.
Add column
In-Place?: *Yes*
Rebuilds Table?: *Yes*
Permits Concurrent DML?: *Yes* (Concurrent DML is not permitted when adding an auto-increment column.)
Only Modifies Metadata?: *No*
Data is reorganized substantially, making it an expensive operation.
In practice, the last no is a serious problem.Quoting from the article:
real problem for big tables
as adding a few columns to our biggest tables started to take 2+ hours
or sometimes was completely unpredictable and exceeded our announced downtime windows.
Apparently, adding a column was even a problem during a maintenance window because the runtime was even longer than they expected.Compared to PostgreSQL:
As long as the new column is NULL and does not have a default value,
it’s in practice a no-op to add it. No matter if your table size is 100MB or 100GBSmall point of attention, on Safari/OSX swat.io loads as a white page with a scrollbar (it notices the page is larger in height), but only to be populated with content only 5 to 10 seconds after.
Wouldn't having "max_connections" postgresql processes create more problems?
We hit the max connections limit in postgres too at peak times (but no lock-up or similar thing happened) and per advice of our hosting provider we added pgbouncer to the stack last week and will hopefully don't have much problems here anymore.
Disclaimer: I wrote that article.
What we see in practice, though, is that people often increase max_connections to rather insane values. There's only a certain number of active connections each box can support (say, ~2*cores, sometimes more), and it's one of the things we check whenever a customer contacts us with performance issues. Oh, you increased max_connections to 7243, it was running fine for a while and then you got a short burst of activity on Monday morning and it's crawling out of the rack? pgbouncer FTW in most cases (in transaction pooling mode).