| Current stable major version | 16 (Sep 2023, with 17 released Sep 2024) | 7.0 (Aug 2023, with 8.0 released Oct 2024) | postgresql.org/releases · mongodb.com/docs/manual/release-notes |
| Data model | Relational (rows + columns) + JSONB column type | Document (BSON, ~16 MB max per doc) | Official docs |
| License | PostgreSQL License (permissive, BSD-like) | SSPL v1 (since Oct 2018) — not OSI-approved | postgresql.org/about/licence · mongodb.com/licensing |
| Query language | SQL (SQL:2023 compliant subset) | MQL + Aggregation Pipeline (JSON-like DSL) | Official docs |
| Multi-document transactions | Full ACID (default since v6) | ACID multi-doc (since 4.0, replica set); sharded (since 4.2) | Official docs |
| Index types | 35+ (B-tree, GIN, GiST, BRIN, Hash, SP-GiST, Bloom, …) | ~8 (single-field, compound, text, geospatial, hashed, …) | postgresql.org/docs/current/indexes-types · mongodb.com/docs/manual/indexes |
| Native horizontal sharding | No (requires Citus, pg_partman, or Vitess-style external sharding) | Yes (built-in, chunk-based range or hashed sharding) | Official docs |
| Replication | Streaming (async/sync), logical replication | Replica sets (async primary→secondary) | Official docs |
| DB-Engines ranking (recent) | Top 5 | Top 5 | db-engines.com/en/ranking; ranks shift month to month |
| Stack Overflow 2024 "used" | 48.7% (#1 database) | 24.8% | Stack Overflow Developer Survey 2024 — Databases |
| Managed cloud (entry-level pricing) | Supabase free, Neon free, RDS ~$15/mo (db.t3.micro) | MongoDB Atlas M0 free, M10 ~$60/mo | Vendor pricing pages |
| Typical read latency (primary index lookup, local LAN) | <1 ms (B-tree index) | <1 ms (B-tree index on _id) | Hardware-dependent |
| JSON query performance | JSONB + GIN index ≈ native document DB speed | Native | Official benchmarks |