In brief
PostgreSQL is enough for most business systems: transactional applications, portals, order systems and mid-sized reporting databases. It has a liberal, free license, transactions, the JSONB type, full-text search, partitioning, replication and extensions, for example for vector search. You need more when writes do not fit on one server, when analytics scan billions of rows, when you need automatic failover (external tools provide that) or thousands of concurrent connections without a pool.
What PostgreSQL gives you without extra systems
Many companies add a separate database for every new task: a document store for JSON, a search engine for text, a separate system for vectors. PostgreSQL covers a good share of those needs itself or through extensions, and every extra system is one more copy of data to keep in sync.
| Need | In PostgreSQL | When to look for more |
|---|---|---|
| transactions, data consistency | built in, with transaction isolation | rarely: this is the database's core strength |
| JSON documents | the JSONB type with GIN indexes | when the whole data model is loose documents without relations |
| text search | built-in full-text search | when you need advanced search with typo tolerance, facets and ranking for a store |
| large historical tables | declarative partitioning, e.g. by month | when one table grows by billions of rows a year and is constantly analyzed |
| vectors for AI | the pgvector extension with HNSW and IVFFlat indexes | when there are hundreds of millions of vectors and very low latency matters |
| spatial data | the PostGIS extension | rarely |
| a copy for reporting | streaming and logical replication | when reports need a columnar model |
The PostgreSQL license is liberal, similar to BSD and MIT. There are no per-core fees and no editions with features locked out of the free version, which simplifies the math when migrating from commercial databases, as covered in Migrating from Oracle to PostgreSQL.
Limit 1: writes on a single server
In a standard setup, all writes go to one primary server. Replicas can serve reads, but not writes. For most companies this is not a problem: one well-sized server with fast disks will handle order systems, a warehouse and a customer portal.
The limit appears when there are more writes than one server can take, for example telemetry from tens of thousands of devices or very heavy transactional traffic. Then you have three routes: splitting data across databases by domain, extensions that distribute tables across nodes, or a different database designed for distributed writes. Before you start, check whether the bottleneck is actually queries and indexes, because that is a more common cause than the server itself. See SQL query performance.
Limit 2: analytics on large data
PostgreSQL stores data in rows. That is good for transactions, where you read and change individual records. A report that sums five years of sales across three dimensions, however, reads whole tables, and a row store does that more slowly than a columnar warehouse.
A practical order:
- Reports on a replica. Heavy queries go to a replica, not to the production database.
- A separate reporting database in PostgreSQL with tables shaped for reports, refreshed overnight or every few minutes.
- A columnar warehouse, when data runs into billions of rows and reports must answer in seconds.
For a mid-sized company, step two is often enough, as described in A data warehouse for a mid-sized company.
Limit 3: high availability and connections
Failover. PostgreSQL replicates to standby servers, but its documentation states plainly that the database does not include the software to detect a primary failure and switch traffic to a standby. External tools or a managed cloud database service do that. Failover has to be rehearsed regularly, not just configured.
Connections. PostgreSQL starts a separate process for each connection. Hundreds of applications and containers, each opening dozens of connections, quickly exhaust server memory. The fix is a connection pool in front of the database, described in Database connection pooling.
Maintenance. Every row change leaves an old version behind, which the VACUUM process cleans up. Autovacuum usually does this on its own, but tables with very frequent changes need tuning. A neglected VACUUM means bloated tables, slower queries and, in the extreme case, writes stopping to protect data from transaction ID wraparound.
How to check whether PostgreSQL is enough
Questions to answer before choosing or migrating:
- How many writes per second at peak, and how will that grow over three years?
- How large are the biggest tables, and does anyone report on them directly?
- How much downtime is acceptable during a failure, and who switches traffic?
- How many applications and instances connect to the database, and is there a connection pool?
- Which commercial database features are in use: procedures, packages, types, a job scheduler?
- Who monitors the database: queries, locks, VACUUM, replication. A common telemetry standard is covered in OpenTelemetry.
If the answers fall within the limits described above, PostgreSQL will be simpler and cheaper to run than a set of several specialized databases. PostgreSQL is part of the technology stack in, among others, the project profitability analytics for a consulting firm and a city resident services portal. We build data models, reporting databases and reports whose figures match the source systems in our Data and reporting service.
Questions and answers
Is PostgreSQL suitable for critical systems?
Yes, provided that the database is surrounded by what it does not include itself: automatic failover, backups with restore tests, monitoring and procedures. The database itself has transactions, replication and a write-ahead log that are sufficient for this. Most problems in practice come from operations, not from the engine.
Is PostgreSQL with pgvector enough instead of a separate vector database?
Often, yes. The pgvector extension adds a vector type and indexes for similarity search, and the vectors sit next to the data and permissions you already have. A separate vector database makes sense for very large collections and strict latency requirements. The comparison is in Vector databases.
Is PostgreSQL in the cloud the same database as on your own server?
The engine is the same, but a managed service takes over backups, upgrades and failover, in exchange for limited system access and a restricted choice of extensions. Before choosing, check that the extensions you need are available and in which region the data lives.
How long does a migration from a commercial database to PostgreSQL take?
It depends mainly on how much logic lives in the database: procedures, packages and triggers. Tables and data move quickly. Code in procedures has to be rewritten and tested, and applications checked for differences in types, dates and sorting. The plan starts with an inventory of that logic.
Sources
- PostgreSQL Licence
- JSON Types, PostgreSQL documentation
- Full Text Search, PostgreSQL documentation
- Table Partitioning, PostgreSQL documentation
- Logical Replication, PostgreSQL documentation
- Failover, PostgreSQL documentation
- How Connections Are Established, PostgreSQL documentation
- Routine Vacuuming, PostgreSQL documentation
- pgvector, project repository