Prompt
How do I know when PostgreSQL is no longer the right database?
Latest observation
PostgreSQL is “no longer the right database” when the problem you’re trying to solve is consistently pushing against what it’s good at, and you’re paying more in complexity, cost, or risk to keep it working than you would by switching to something else.
A practical way to tell is to look for these signs:
1) You’ve outgrown its scaling model
PostgreSQL scales very well vertically and can scale horizontally in some patterns, but it’s not the easiest fit when you need:
- Massive write throughput across many nodes
- Global, multi-region active-active writes with low latency
- Very large datasets that require distributed storage/sharding as a core feature
- Near-infinite elastic scaling without careful operational work
If you’re constantly fighting replication lag, shard management, or connection limits, PostgreSQL may be becoming the wrong tool.
2) Your workload is fundamentally not relational
PostgreSQL can handle JSON, arrays, geospatial, full-text search, etc., but if your dominant access pattern is better served by another model, that’s a clue:
- Key-value lookups at huge scale → Redis, DynamoDB, etc.
- Wide-column / time-series patterns → Cassandra, ClickHouse, TimescaleDB, etc.
- Document-first data with flexible schema and frequent shape changes → MongoDB, document stores
- Graph traversals with deep relationships → Neo4j or similar
If you’re using PostgreSQL but modeling everything awkwardly to fit relational tables, you may be forcing it.
3) You need a special capability PostgreSQL doesn’t provide natively
Examples:
- Built-in distributed transactions across many shards
- Global secondary indexes in a distributed cluster
- Automatic horizontal partitioning and rebalancing
- Specialized search, analytics, or streaming integration
- Multi-master conflict handling as a primary requirement
You can often bolt on solutions, but if the architecture is becoming a patchwork, it may be time to reconsider.
4) Operational pain is becoming the main cost
PostgreSQL may no longer be right if:
- Upgrades are risky and frequent downtime is unacceptable
- Backups/restores are too slow for your RTO/RPO needs
- Read replicas, failover, vacuum, bloat, and tuning dominate engineering time
- Connection pooling and max connection limits are a persistent bottleneck
- You need a larger platform team just to keep the database healthy
A database should be a force multiplier, not a constant fire drill.
5) Your query patterns are mismatched
PostgreSQL is great for transactional workloads and reasonably complex queries. It may be the wrong fit if:
- You need extremely high-concurrency simple reads/writes with low latency
- You’re doing heavy analytical scans over huge datasets all the time
- You need columnar performance for BI/warehouse-style queries
- Most queries are append-only event processing or time-series rollups
In those cases, a warehouse, OLAP DB, or time-series system may be better.
6) Product requirements have changed
Sometimes PostgreSQL isn’t the issue; the product has evolved. Reconsider when you have requirements like:
- Multi-tenant isolation at very large scale
- Per-customer data locality requirements
- Real-time personalization at enormous throughput
- Offline sync / edge replication
- Compliance constraints that require data placement or retention patterns PostgreSQL doesn’t handle elegantly
7) You’re using lots of “escape hatches”
If your schema and app logic rely heavily on:
- JSONB everywhere to avoid schema design
- Triggers for core business logic
- Extensive custom functions/extensions
- Many background jobs to work around performance issues
- Application-side orchestration because the DB can’t naturally express the access pattern
that can be a sign you’re stretching PostgreSQL beyond its sweet spot.
A good rule of thumb
PostgreSQL is still a good choice if:
- Your data is relational or mixed but still relational at the core
- You need strong consistency and ACID transactions
- Your scale is moderate to high but manageable on a few nodes
- You value reliability, SQL, and ecosystem maturity
It’s likely time to consider another database when the database design and operations are no longer simple, and PostgreSQL is creating repeated engineering overhead just to meet baseline requirements.
Before switching, ask these questions
- What exact requirement is PostgreSQL failing to meet?
- Is the issue scale, latency, availability, or data model?
- Could partitioning, indexing, pooling, caching, or read replicas fix it?
- Would a smaller architectural change solve it better than a full migration?
- Is the new database clearly better for the top 1–2 workloads, not just “different”?
If the answer is “we’re considering a new DB because PostgreSQL feels hard,” that’s usually not enough. If the answer is “we have a workload PostgreSQL is objectively not designed for,” that’s a stronger signal.
Common alternatives by need
- Redis: cache, ephemeral state, fast key-value access
- MySQL: similar relational use cases, different ecosystem/operational tradeoffs
- MongoDB: document-heavy, flexible schema
- Cassandra / DynamoDB: massive scale, simple access patterns, distributed writes
- ClickHouse / BigQuery / Snowflake: analytics/OLAP
- Elasticsearch / OpenSearch: search
- Neo4j: graph relationships
- TimescaleDB / InfluxDB: time-series
- Kafka + OLAP/DB: event-driven pipelines
If you want, I can also give you:
- a decision checklist,
- a “Postgres vs. migrate” scorecard, or
- help evaluate your specific workload.