MariaDB vs PostgreSQL
The MySQL fork versus the most advanced open-source database. One is familiar. One is better.
PostgreSQL
PostgreSQL wins on features, standards compliance, and ecosystem momentum. MariaDB is fine if you're migrating from MySQL, but for new projects there's no reason to pick it over Postgres. The gap has only widened.
The History
MariaDB exists because Oracle bought MySQL and the community got nervous. Monty Widenius (MySQL's creator) forked it in 2009 and promised to keep it truly open source.
PostgreSQL has been independently developed since 1986. No corporate drama, no forks, no licensing anxiety. It's just been getting better every year for four decades.
Why PostgreSQL Wins
The feature gap is real:
⢠JSON support: Postgres has JSONB with full indexing. MariaDB's JSON is just a string alias with functions bolted on. ⢠Extensions: PostGIS, pgvector, TimescaleDB, pg_trgm ā the extension ecosystem is unmatched. ⢠ACID compliance: Postgres has stricter defaults. MariaDB inherits MySQL's historically loose approach to data integrity. ⢠Window functions: Postgres had them for years before MariaDB. ⢠CTEs: Postgres optimizes recursive CTEs properly.
Every managed database provider prioritizes Postgres. Neon, Supabase, CockroachDB, Aurora ā they all bet on the Postgres wire protocol.
Where MariaDB Still Makes Sense
MariaDB isn't bad. It's a solid database that works well for:
⢠MySQL migrations: Drop-in replacement for most MySQL apps. Change the connection string and go. ⢠Shared hosting: cPanel and cheap hosting providers still ship MariaDB. ⢠Read-heavy workloads: MariaDB's Aria storage engine can be faster for specific read patterns. ⢠Existing expertise: If your team knows MySQL/MariaDB, the migration cost to Postgres is real.
But for anything new? Postgres.
Performance
Performance benchmarks between the two are close enough to be irrelevant for most apps. Both handle millions of rows without breaking a sweat.
Where Postgres pulls ahead is complex queries. If you're doing analytical work, lots of JOINs, or heavy aggregations, Postgres's query planner is significantly smarter.
MariaDB can edge ahead on simple INSERT/SELECT workloads, but the difference is single-digit percentages. Not worth choosing a database over.
Quick Comparison
| Factor | MariaDB | PostgreSQL |
|---|---|---|
| JSON Support | Basic (string alias) | JSONB with indexing |
| Extensions | Limited | Massive ecosystem |
| MySQL Compatibility | Drop-in replacement | Different syntax |
| Standards Compliance | Decent | Excellent |
| Vector Search | No native support | pgvector |
| Managed Options | Fewer choices | Neon, Supabase, Aurora |
| Simple Queries | Fast | Fast |
| Complex Queries | Good | Better optimizer |
The Verdict
Use MariaDB if: You're migrating from MySQL, stuck on shared hosting, or your team only knows MySQL syntax. It's a fine database for straightforward workloads.
Use PostgreSQL if: You're starting a new project. Full stop. The ecosystem, features, and managed hosting options make Postgres the default choice in 2026.
Consider: If you need MySQL compatibility with Postgres features, look at CockroachDB or TiDB. They speak both protocols.
PostgreSQL wins on features, standards compliance, and ecosystem momentum. MariaDB is fine if you're migrating from MySQL, but for new projects there's no reason to pick it over Postgres. The gap has only widened.
Related Comparisons
Disagree? nice@nicepick.dev