I work for a software vendor and and this is a fairly typical scenario for customers of our dbShards product, who often have an app that starts to get traction and then requires a more reliable and extensible back end database that is easier to apply schema changes to without downtime.
and mostly people start with as low as 10.000 people. Scaling means starting from 1 going to X. and postgresql is well enough for most stuff. You don't need multi-master replication for most stuff. people mostly don't need write scalability. and for stuff that needs some writes they could easily cache that. (see instagram)
- First class support for sharding & replication
- Pluggable storage engine
- Capped collection (i.e. tailable table/collection)
- A query language which doesn't boil down to string concatenation (easier to manipulate in a language of your choice, but harder for human friendly adhoc query writing)
Not that postgresql doesn't offer any of the above in some form or another. Just that MongoDB does seem to make 1 & 2 & 3 easy to deploy & manage
You're going to pay for getting the data model right eventually. The only question is - do you want to pay for it now or later? If you push it off until later, it's generally more painful to make changes. Or, you have to maintain a sub-optimal model for as long as the application exists.
Because I have never seen or heard of a situation where the data model has been designed upfront and never changed along the way. And you seem to be turning this into a black/white scenario. In almost all cases you do your best effort upfront and then iterate.
The advantages of these NoSQL/Schemaless style databases is that you can do this migration in your app instead of in your app+database. And unfortunately schema/data migration tools for databases really aren't that great - even after all these decades.
With a SQL database, there is one source of truth: the current schema. It is not necessary to maintain historic information about all previous versions of the schema in every program that uses the database; they only have to know about the current version.
As an aside, Postgres supports multiple schemas for a given database, so it is trivial to support multiple versions of a single table, provide legacy support via views, etc.
Because it's fast, portable and easy to use. Pretty much what most developers want.
People can bring up the tired "oh but you will lose your data" jokes but it really isn't that much worse than anything else on the market. They all have bugs at some point. And I really don't see how PostgreSQL is any more reliable or has a larger expertise pool/tooling etc. If you were talking about MySQL/Oracle I would agree but not PostgreSQL.
Given that PostgreSQL has JSON data types, and performance when using those data types is competitive with the dedicated JSON or document databases, I honestly can't think of any reason to use something else. Especially given the long reliability history, the large pool of expertise, the tooling, etc. of PostgreSQL vs. the other options.
Am I missing something in this assessment of the situation? I see so many smart people deploying web applications (in particular) on MongoDB and others...why are they choosing it over PostgreSQL?