Economy research · Standard sources

PostgreSQL vs MySQL for a new multi-tenant SaaS product in 2026

Completed August 1, 2026

PostgreSQL vs MySQL for a new multi-tenant SaaS in 2026

Prepared on 2026-08-01. This synthesis incorporates product capability research, architecture and platform analysis, and an adversarial evidence-quality review.

Executive summary

For a greenfield multi-tenant SaaS in 2026, PostgreSQL is the safer default. Native row-level security (RLS), jsonb, transactional DDL, and the extension ecosystem address the hard parts of multi-tenancy: tenant isolation, schema evolution, and heterogeneous per-tenant data. MySQL remains viable and sometimes preferable when the team already runs MySQL, needs PlanetScale-style branching, or wants a conservative LTS release channel. Neither database blocks multi-tenancy; the choice is about ergonomics, operations, and ecosystem rather than base feature availability.

Recommendation

Adopt PostgreSQL 18 (or a managed equivalent such as RDS, Aurora PostgreSQL, Cloud SQL, Neon, or Supabase) for a new multi-tenant SaaS in 2026. Start with shared-schema tenancy plus RLS, move to hybrid isolation as revenue tiers emerge, and keep SQL portable so a future MySQL migration remains possible if constraints change.

Choose MySQL only if there is a concrete reason: existing MySQL code or ORM investment, a requirement for PlanetScale-style branching, an LTS release-compliance requirement, or a team that already operates MySQL at scale for simple read-heavy workloads.

Decision table

Decision dimensionPostgreSQLMySQLEdge
Tenant isolationNative RLS; multiple schemas per databaseNo native RLS; schema equals database; app/view/proxy enforcementPostgreSQL, with policy design care
JSON and semi-structured datajsonb with rich operators and GIN indexesJSON type with generated-column or functional indexesPostgreSQL
IndexingB-tree, hash, GiST, GIN, SP-GiST, BRIN; partial and expression indexesInnoDB B-tree, functional indexes; no partial indexesPostgreSQL
DDL safetyTransactional DDL; failed migrations roll backAtomic per-statement DDL; mature online DDL tooling (gh-ost, pt-osc)Tied; PostgreSQL is safer for rollbacks, MySQL is smoother for large online changes
Extensibility300+ extensions (pgvector, PostGIS, Citus, TimescaleDB, pg_cron)Storage-engine focus; MySQL 9.x adds VECTOR and JS stored programsPostgreSQL
Scale-outCitus is an extension of standard PostgresVitess or PlanetScale fork/proxy; HeatWave proprietaryPostgreSQL for staying on standard tooling; MySQL for PlanetScale users
Managed platformsRDS, Aurora, Cloud SQL, Azure, Neon, Supabase, Render, Fly, RailwayRDS, Aurora, Cloud SQL, Azure, PlanetScale, HeatWaveRoughly equal; PostgreSQL is the default on Neon, Supabase, and Vercel Postgres
Release cadenceAnnual majors, no LTS; 18.4 current, 19 beta8.4 LTS; 8.0 EOL April 2026; 9.x Innovation releases with a referenced 9.7 LTS pathMySQL for LTS expectations; PostgreSQL for steady feature access

Multi-tenancy patterns

Shared-schema is the most common starting point, and strict tenant isolation is the hard part regardless of engine.

PostgreSQL RLS uses CREATE POLICY to apply row filters based on a session setting such as current_setting('app.tenant_id'). Important correction: RLS does not reject queries. It filters rows, so a missing tenant context produces an empty result set rather than an error. Applications must set the tenant context on every connection and treat unexpected empty results as a configuration bug.

Schema-per-tenant works differently by engine. PostgreSQL supports many schemas inside one database. In MySQL, a schema is effectively a database, so schema-per-tenant becomes database-per-tenant, with larger catalog overhead and wider connection or dump blast radius. The frequently cited ceiling of roughly 500 schemas before catalog bottlenecks appear is anecdotal and workload-dependent; test with realistic table and index counts.

Database-per-tenant is viable and is the strongest isolation model, but it requires a connection pooler once you move past approximately 100 tenants. The exact threshold depends on connection limits, idle timeouts, pool settings, and application connection behavior.

A common production pattern is hybrid isolation: shared-schema with RLS for the free or self-serve tier, and dedicated schemas or databases for paying tenants.

Feature comparison highlights

  • JSON: PostgreSQL jsonb is binary, decomposed, and GIN-indexable, with operators such as ->, ->>, @>, and @?. MySQL stores JSON in an internally tagged format and requires generated columns or functional indexes for indexing. A claimed 3.7x JSON performance gap is unverified anecdote and should not drive the decision.
  • Indexing: PostgreSQL partial and expression indexes are useful for scoping data by tenant or status. MySQL has functional indexes since 8.0.13 but no partial indexes and no equivalent index access-method variety.
  • PostgreSQL 18 adds skip scan for multicolumn B-tree indexes, async I/O, uuidv7(), virtual generated columns, and temporal constraints. Temporal constraints provide time-bounded uniqueness, a capability MySQL does not currently offer.
  • Transactional DDL: PostgreSQL rolls back failed migrations cleanly. MySQL 8 has atomic per-statement DDL but not transaction-level rollback across a migration. This matters when a schema change touches many tenant-shared tables.
  • Online DDL culture is inverted: MySQL has mature tooling in gh-ost and pt-osc, while PostgreSQL DDL is mostly instant but has short exclusive-lock moments that can stall application traffic. This is an operational trade-off, not a feature win for either engine.

Extensibility and future-proofing

PostgreSQL can absorb adjacent workloads without changing engines: pgvector for vector search, PostGIS for geospatial, TimescaleDB for time series, pg_cron for scheduled jobs, and Citus for distributed tables. The extension mechanism is integrated with the query planner, so these tools behave as first-class features.

MySQL differentiation happens more at the storage-engine layer, such as InnoDB and HeatWave columnar storage. MySQL 9.x is adding modern capabilities like a native VECTOR type and JavaScript stored programs, but the surrounding ecosystem is less mature than PostgreSQL's extension ecosystem.

Platform and lifecycle

Managed availability is near-equal across the major clouds. Version lifecycle is a bigger operational difference.

  • PostgreSQL 18 went GA on 2025-09-25, with 18.4 as the current stable release in May 2026 and 19 beta starting 2026-06-04. PostgreSQL has no LTS channel, so you must plan for annual major upgrades.
  • MySQL 8.0 entered sustaining support and effectively hit end-of-life on 2026-04-21. The current LTS is 8.4. Secondary sources reference a 9.7 LTS as the upgrade target; confirm exact support dates on dev.mysql.com before committing.
  • MySQL's LTS/Innovation model means long support windows are available, but new features generally land in Innovation releases rather than being backported to LTS.

Evidence quality and limitations

  • Strong evidence: official PostgreSQL and MySQL release notes and documentation, MySQL EOL notices, and Citus documentation.
  • Weak evidence: many comparison claims come from 2025-2026 secondary blogs with vendor bias. The apparent field-wide consensus toward PostgreSQL is partly a sampling artifact, because PostgreSQL advocates and Postgres-monetizing platforms outnumber MySQL advocates in the source set.
  • Unverified numbers that should be treated as hypotheses, not facts: the roughly 20x RLS performance penalty, the 3.7x JSON performance gap, the 500-tenant schema-per-tenant ceiling, and the specific count of RLS-related CVEs.
  • No controlled 2026 apples-to-apples benchmark of PostgreSQL vs MySQL on identical managed tiers was found. Oracle's cost benchmark is MySQL-only and should not be generalized to Postgres.
  • The decision is unlikely to be settled by missing base features: both engines now support CTEs, window functions, JSON, declarative partitioning, full-text search, GIS, and logical/physical replication.

When to pick MySQL instead

  • Existing MySQL codebase, ORM, or in-house expertise.
  • PlanetScale-style branching and scale-out is a product requirement.
  • Your organization needs an LTS release channel for compliance or operational conservatism.
  • The workload is simple, read-heavy, and commodity-shaped, such as WordPress-style applications.
  • If MySQL is chosen, plan for app-level tenant isolation because MySQL has no native RLS.

Proof-of-concept tests before finalizing the decision

  • Run pgbench with and without a realistic RLS policy at 1, 100, and 1,000 simulated tenants to measure actual RLS overhead.
  • Benchmark your real JSON document shape and query patterns on jsonb versus MySQL JSON with generated-column indexes.
  • Test connection pooling at 100 to 500 tenant databases to validate pooler behavior and connection limits.
  • Simulate a failed DDL migration in both engines and verify rollback behavior.
  • If schema-per-tenant is in the roadmap, create 100, 500, and 1,000 schemas with realistic table and index counts and measure catalog latency.
  • Quote identical managed tiers on the target cloud for both engines rather than relying on vendor benchmarks.

Bottom line

Start with PostgreSQL 18 for a new multi-tenant SaaS in 2026. Use shared-schema tenancy with RLS initially, invest in tenant-context discipline, and adopt hybrid isolation as revenue tiers emerge. Choose MySQL only when there is a concrete reason tied to existing systems, PlanetScale, LTS compliance, or team expertise. Keep the persistence layer portable either way.