MongoDB vs PostgreSQL
Of the 1,263 makers' products we know the database of, 128 chose MongoDB (10%) and 98 PostgreSQL (8%); 1 uses both. Among the 397 launched in 2026, MongoDB is in 5% and PostgreSQL in 1%, against 17% and 7% of those launched in 2024 or earlier. They're different kinds of tool, managed database and run it yourself, so the counts don't measure the same choice. PostgreSQL is the more common pick among Next.js products (40 vs 35) and React products (32 vs 14). On GitHub, 38 public pull requests moved projects from MongoDB to PostgreSQL, and 23 the other way.
Two sides of the database decision: managed database and run it yourself. When each fits, what it costs, who moves from one to the other, and what makers who chose it say.
Which fits you
- Document-shaped data and teams already fluent in Mongo.
Use it whenYour team already knows Mongo, or your records vary so much in shape that a fixed schema gets in the way.
Trade-offNo joins or schema by default, so relational data and migrations take discipline you'd get for free in Postgres.
- You already run your own server and want a flat monthly cost
Use it whenYou already run a server, or want extensions and settings a managed provider doesn't offer.
Trade-offBackups, upgrades, failover and connection pooling are yours to set up and watch.
At a glance
| Used by | 128 makers' products · 174 open-source projects | 98 makers' products · 622 open-source projects |
|---|---|---|
| Cost at default usagedatabase size 8 GB, data transfer 50 GB, document or row reads 10 million reads, document or row writes 2 million writes | $58/mo Atlas Dedicated M10 | — |
| Moved to it on GitHubpull requests since Oct 2024 | 23 from PostgreSQL | 38 from MongoDB |
| Downloads | 14.2M/wk−46% vs npm | 51.8M/wk+31% vs npm |
| Pricing | Free Atlas tier; paid clusters by size. · paid from $0.011/hour | Free and open source under the PostgreSQL License; you pay only for the server or managed service that runs it. |
| Free tier | Yes | Yes |
| Open source | No · self-hostable | Yes · self-hostable |
| Incidents, 90 daysfrom its status page | 13 (5 major) | no public status feed |
Which makers on your framework pick
Makers' products built with each framework that chose either one, for database.
| Framework | |||
|---|---|---|---|
| 35 | 40 | All 382 Next.js products' picks → | |
| 14 | 32 | All 73 React products' picks → | |
| 3 | 6 | All 13 FastAPI products' picks → | |
| 3 | 2 | All 27 Astro products' picks → |
New launches vs older products
A tool that came first has products from every year since, so its total runs ahead. Here is what products launched each year chose, as a share of those that made the database decision (by the year they launched on Product Hunt).
| Launched | Products | ||
|---|---|---|---|
| 2022 or earlier | 15% 4 | 11% 3 | 27 |
| 2023 | 13% 5 | 5% 2 | 38 |
| 2024 | 17% 47 | 7% 19 | 270 |
| 2025 | 11% 35 | 9% 28 | 323 |
| 2026 | 5% 18 | 1% 2 | 397 |
Who moves from one to the other
Public pull requests on GitHub since Oct 2024 whose title says "MongoDB to PostgreSQL" or the reverse — real code changes, by developers in general rather than makers only.
- feat: migrate NestJS persistence from Prisma/Postgres to MongoDB (Mongoose)Diatech226/Bikiengasite · 2026-09-30
- transparency-service: Postgres to MongoDB Atlasaimozart/entropa-public · 2026-09-28
- Switch backend storage from Postgres to MongoDB.Debarun1205/valmont-financial-group · 2026-09-25
- Change the db from postgres back to mongodbBOL-DEV/zentry-backend · 2026-09-16
- Codewithbasu postgres to mongodbCodeWithBasu/Life-RPG · 2026-09-13
- feat: migrate Prisma/Postgres backend to MongoDB (Prisma 6, ObjectId)Diatech226/Maryme-backend · 2026-09-06
- feat(db): migrate primary data store from Postgres to MongoDBByte-Quill/user-management-system · 2026-08-06
- Move hq from Postgres to MongoDBzoworkhq/zoblocks · 2026-08-06
- Move logs from Postgres to MongoDBMuhammetAli2828/Ops_center · 2026-07-21
- Migrate chocolate-store from Postgres to MongoDBaninamu/chocolate-store · 2026-07-13
- refactor(db)!: migrate Payload CMS from MongoDB to Postgresm6-o4/payload-template-pg · 2026-09-25
- feat(db): move the data layer from MongoDB to Postgres with pgvectorjohnbekele/infracanvas · 2026-08-09
- fix: rewire merchant read path from MongoDB to Postgres, delete Merch…Syed-web-coder/expense-project · 2026-07-27
- Migrate storage from MongoDB to Postgres, hosting from Render to Vercelprashanth-ds-ml/workhub-office-time-tracker · 2026-07-13
- migrate ConnectionRequest feature from MongoDB to Postgres (Drizzle)Dikshant441/merge_me · 2026-07-08
- Database change from mongodb to postgresKrispymarty/CyberShield · 2026-06-22
- Migrate auth/school data layer from MongoDB to Postgres (Drizzle + Neon)Kayd-06/ACADEMIC-PLANNING-SYSTEM · 2026-06-22
- Switch subtraction reads from MongoDB to Postgresvirtool/virtool · 2026-06-05
- WIP: MongoDB to Postgres cutoverScarletbobcat/Nail-Art · 2026-05-25
- Ref/migarate from mongodb to postgresHosseinNamvar/bitex · 2026-05-24
What makers say
Makers on using it for database, from Product Hunt and Starter Story interviews, each linked to the source. Products with a page of their own and fuller notes first.
Shoutout to MongoDB for providing a powerful, flexible database solution that scales with our needs. Your platform helps us manage and analyze vast amounts of data seamlessly!
…>Salesforce , Hubspot , HeyMantle Customer Support: Intercom Insights: MixPanel Database: MongoDB Hosting: AWS Internal Communications: Slack Creative Design: Figma + Canva Video recordin…
MongoDB’s native vector search makes it easy to keep structured data and embeddings together. It’s seamless to use within existing MongoDB clusters and scales well for production RAG setups.
Postgres is rock-solid. It handles complex data relationships gracefully and gives us the querying power we need as we scale. For relational data, it’s hands down the best choice for us.
We picked PostgreSQL over MongoDB and dedicated vector databases because one proven database handles our relational data, JSON and agent memory, with no extra stores to run.
PostgreSQL is our go-to database because of its reliability, scalability, and powerful support for structured data, making it ideal for managing and syncing customer data across multiple platforms.
Loved and watch-outs
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.
- The flexible document model lets fast-changing products evolve their data without rigid migrations. PHPH 2PH 3HN
- Atlas starts on a free tier and handles scaling, backups and monitoring, so there is little database to manage. PHPH 2PH 3PH 4
- Atlas Vector Search keeps embeddings next to regular documents, so RAG and agent data combine vector and structured queries. PHHN
- Its history of unsafe defaults and lost writes left a lasting reputation that still keeps many developers away. HNHN 2HN 3HN 4
- Anything beyond simple reads and writes is hard, and aggregation pipelines feel primitive next to SQL, which costs more over time. HNHN 2
- Indexes are kept in memory, so larger datasets demand a lot of server RAM. HN
- It is rock-solid, keeps data consistent with strong transactions, and handles complex relational queries well. PHPH 2PH 3PH 4
- With pgvector, embeddings live next to relational data, so AI features need no separate vector database. PHPH 2PH 3PH 4
- Extensions and features like PostGIS, JSON support and advanced indexing cover geospatial and semi-structured data too. PHPH 2PH 3
- Built-in full-text search lacks corpus-wide relevance ranking like BM25 and can need very large indexes. HNHN 2
- It has no loose index scan, so SELECT DISTINCT over large tables needs manual workarounds. HNHN 2
- Timestamp versus timestamptz and AT TIME ZONE behavior are easy to get wrong, with edge-case bugs around daylight saving. HNHN 2HN 3
Who uses each
What makers pair each with
Neither quite right?
See the whole database decision →Questions
MongoDB or PostgreSQL: which do makers choose?
Of the 1,263 makers' products we know the database of, 128 chose MongoDB (10%) and 98 PostgreSQL (8%); 1 uses both. Among the 397 launched in 2026, MongoDB is in 5% and PostgreSQL in 1%, against 17% and 7% of those launched in 2024 or earlier. They're different kinds of tool, managed database and run it yourself, so the counts don't measure the same choice. PostgreSQL is the more common pick among Next.js products (40 vs 35) and React products (32 vs 14). On GitHub, 38 public pull requests moved projects from MongoDB to PostgreSQL, and 23 the other way. Choose MongoDB if document-shaped data and teams already fluent in Mongo; choose PostgreSQL if you already run your own server and want a flat monthly cost.
When should I pick PostgreSQL over MongoDB?
Pick PostgreSQL if: You already run your own server and want a flat monthly cost.
Are people switching from MongoDB to PostgreSQL?
Public GitHub pull requests since 2024-10-02: 38 from MongoDB to PostgreSQL, 23 from PostgreSQL to MongoDB.

