PostgreSQL vs MySQL: Which One for a New Project in 2026
For a new project, PostgreSQL is the recommendation unless you have a specific reason otherwise. Conversely, if your team already has established MySQL operational experience and tooling, there’s usually no reason to switch either. Both are mature, production-grade databases that carry most workloads without strain, so this article is not a superiority debate but a sorting of “under which conditions, which one.” The timing adds urgency on one side: MySQL 8.0 reached end of support in April 2026, so MySQL shops have to decide on the move to 8.4 LTS anyway.
The comparison at a glance #
| Aspect | PostgreSQL | MySQL |
|---|---|---|
| Standards compliance, strictness | Faithful to the SQL standard, strict on integrity | Historically lenient (compensated by modes) |
| Feature breadth | JSONB, arrays, range types, CTEs, window functions, full-text search built in | Core features present, narrower breadth |
| Extension ecosystem | pgvector, PostGIS, TimescaleDB via extension architecture | Limited (storage-engine plugins) |
| Replication | Physical (streaming) + logical; tooling is composable | Long logical-replication history, deep operational lore |
| License and governance | Community-owned, permissive license | Oracle-owned, GPL + commercial dual |
| Version policy | Yearly majors, 5 years support each | LTS (8.4, supported to 2029/2032) + Innovation (9.x) |
Conditions that tilt toward PostgreSQL #
- You plan to use the feature breadth. JSONB, arrays, range types,
DISTINCT ON, transactional DDL (the strength covered in the migrations chapter) — the range of “solved inside the database without a separate system” is wide. Add extensions like vector search (pgvector) and geospatial (PostGIS) and the gap widens further. - Data integrity decides the outcome of your domain. PostgreSQL raises errors instead of quietly accepting bad values. MySQL has defaulted to strict mode for a long time now, but the stricter design philosophy at the foundation is PostgreSQL’s.
- You want to ride the ecosystem’s direction. New frameworks’ defaults, the first line of new tools’ support lists, the release order of managed products — all have favored PostgreSQL for years. The “why it became the default” story from chapter 1 of the basics course doubles as the reason to choose it.
Conditions to keep (or choose) MySQL #
- Your team’s and organization’s accumulation is in MySQL. Operational experience, backup and replication know-how, internal standards, monitoring stacks weigh more than database features. If the cost of discarding that accumulation exceeds PostgreSQL’s feature gains, staying is correct.
- You depend on MySQL-specific ecosystem tools. Large-scale online schema change (gh-ost and friends), orchestration, proxies — MySQL’s fleet-scale tooling has a long verification history. Very-large-scale sharding operations (the Vitess lineage) in particular are a MySQL-side asset.
- Your requirements are plain OLTP plus proven read scaling. In this range the two databases are indistinguishable in practice, and either choice is fine.
If you stay on MySQL, one version decision remains: 8.0 support ended in April 2026, making the move to 8.4 LTS effectively mandatory (8.4 has premier support into 2029), and 9.x is an Innovation line not meant for general production.
Two frequent objections #
“Isn’t MySQL faster?” is no longer a fact — it’s a workload question. Simple PK-lookup-centric loads have scenarios favoring MySQL (InnoDB’s clustered index); complex joins, aggregation, and mixed concurrent read/write have scenarios favoring PostgreSQL’s planner. Don’t decide from one benchmark chart — judge from your own query patterns. “PostgreSQL updates are expensive” is half true. The MVCC implementation does make UPDATE write a new row version with VACUUM trailing behind, but the operational responses (autovacuum tuning, VACUUM operations) are well established — not a reason to flinch at design time.
The decision sequence #
- Start with where your team’s accumulation (operations experience, tooling, standards) lies. If it exists, that side is the default.
- Without accumulation (new team, new product), default to PostgreSQL and only check for MySQL-specific requirements (the mega-scale sharding ecosystem and such).
- Cross-check your feature requirements (vector search, geospatial, complex analytical queries, JSONB). If any is core, PostgreSQL’s side gains weight.
- If you land on MySQL, start on 8.4 LTS. 8.0 is out of support and 9.x is Innovation.
Summary #
- New projects default to PostgreSQL; teams already on MySQL default to staying. It’s a matter of conditions, not superiority.
- PostgreSQL’s strengths are feature breadth (JSONB, extensions, transactional DDL) and the ecosystem’s direction.
- MySQL’s strengths are accumulated fleet-scale operational lore and specialized tooling (online schema change, the sharding ecosystem).
- MySQL 8.0 ended support in April 2026. Even staying requires an 8.4 LTS migration plan.
- Performance debates are workload questions. Judge from your own query patterns, not quoted benchmarks. To learn PostgreSQL from the ground up, the basics course is ready.