Postgres vs MongoDB: Pick by the Questions You'll Ask Later
By Aakash Verma · · 5 min read
Postgres or MongoDB for a new app? I'd pick Postgres for almost every product I get asked to build: anything with users, payments, orders, permissions or reports. I'd pick MongoDB when the data really is a pile of self-contained documents with shapes that keep changing and that nobody needs to join, like event payloads, scraped pages or per-tenant configs.
Most of my database work has been on MySQL and Postgres, with some MongoDB along the way, so I'm not neutral. But the reason I lean this way isn't loyalty. It's that the choice gets made on day one, when the data looks simple, and it gets tested on day 300, when someone asks a question across three collections that were never meant to meet.
Versions checked on November 22, 2026: the PostgreSQL home page and the MongoDB 8.3 release notes.
Where both are right now
Postgres 19 came out three days ago, on November 19, 2026. The release announcement is mostly operations work: REPACK (CONCURRENTLY) finally reclaims space from a bloated table without locking it (it replaces VACUUM FULL and CLUSTER), INSERT ... ON CONFLICT DO SELECT returns the existing row so "get or create" is one statement, foreign key checks on bulk inserts are close to twice as fast in their testing, and JIT is now off by default because its cost estimates "proved unreliable". For JSON people, COPY can now write JSON out directly and the SQL/JSON path language gained lower(), upper(), replace(), split_part() and btrim().
MongoDB 8.3 is the current release line, with 8.3.13 out since October 13, 2026. If you run 8.3.0 through 8.3.12, read the advisory in the release notes (SERVER-131805) and patch.
Neither of these changes the decision much. The decision is about your data.
The data model is the whole argument
In MongoDB, an order is one document: the customer's name, the shipping address, the line items, the payment status, all nested in one JSON-like object. Reading it is one fetch. Writing it is one write. For the screen that shows a single order, this is lovely.
In Postgres, the same order is spread across orders, order_items, customers and probably addresses, joined back together when you read it. More typing up front. In return, the customer exists once. When they change their email, it's changed everywhere, and "how much did customers in Germany spend on product X last quarter" is one SQL query that the planner is very good at.

MongoDB can do that report too. $lookup joins collections in an aggregation pipeline, and it works. But you're now writing joins in a pipeline syntax, against data that was embedded to avoid joins, and the copy of the customer's email inside last year's orders is whatever it was last year. Sometimes that's what you want (an invoice should keep the address it shipped to). Often it's an accident nobody noticed.
"But Postgres can store JSON"
It can, and well. A jsonb column stores binary JSON, a GIN index makes queries on its keys fast, and you can mix it with normal columns in the same table. The usual pattern I like: real columns for the things you filter, join and sort on (id, user_id, status, created_at) and one jsonb column for the part that keeps changing shape, like a webhook payload or form answers.
That covers most of the "our schema isn't settled yet" argument for MongoDB. What it doesn't give you is MongoDB's ergonomics for deeply nested updates. Changing one field three levels down inside an array in jsonb is jsonb_set with a path, and it rewrites the whole value. In MongoDB it's an $set with a positional operator and nobody thinks about it.
Transactions and integrity
Both have multi-document or multi-row transactions now. MongoDB has had multi-document ACID transactions since 4.0, and they work. The difference is in the defaults and the culture around them. In Postgres, foreign keys, NOT NULL, CHECK and unique constraints stop bad data at the door, and you get them by writing the table. In MongoDB, schema validation exists ($jsonSchema on a collection), but it's optional, and plenty of projects never turn it on.
If two parts of your app can both write to the same record, I want the database enforcing the rules, not every code path remembering them.
Scaling, honestly
MongoDB's selling point here is real: sharding is built in. You pick a shard key and the cluster spreads data across machines. Postgres scales up a long way on one machine plus read replicas, and past that you're looking at Citus, partitioning or splitting the app, all of which are more work than MongoDB's version.
The catch is that almost nobody I work with is anywhere near that line. A single Postgres instance on decent hardware handles a lot more than a startup's first few years. Choosing a database for the scale you hope to have in five years, at the price of awkward queries every week until then, is a bad trade.
Licensing and hosting
Postgres uses the PostgreSQL License, a short permissive one. You can run it anywhere, and every cloud sells it managed: RDS, Cloud SQL, Supabase, Neon and more.
MongoDB Community is under the SSPL, which isn't an OSI-approved open source license. For running your own app it doesn't matter. It's why AWS sells DocumentDB, which is MongoDB-compatible but not MongoDB, and why the managed option most people end up on is MongoDB's own Atlas. That's fine, but it's one vendor, and Atlas pricing has its own quirks.
How I actually decide
I ask what the hardest question anyone will ask of this data in a year looks like. If it's "show me this one thing, fast", and the things don't relate to each other much, MongoDB is a fine fit and I won't argue. If it's "how many, how much, which ones, compared to what", I use Postgres, with a jsonb column where the shape is still moving.
For most SaaS apps, marketplaces and internal tools, that second kind of question shows up in the first month, usually from whoever does the finance.
If you're stuck on a database choice for an app you're building, or moving off one you picked too early, I take on that kind of full-stack work. Book a free call; all consultation is free.
Introductory offer
Free cloud cost optimization. You only pay from what I save.
I cut your AWS, cloud, Supabase or Vercel bill for free and keep half of what I save for 6 months. Save nothing, pay nothing. Code, architecture and infrastructure.