How it works
PostgreSQL stores data in tables, speaks rich SQL and keeps data correct under heavy concurrent use with transactions and strict constraints. Beyond the basics it has JSONB columns for document-style data, arrays, full-text search, window functions and row level security.
Its extension system is a big part of its appeal: PostGIS adds maps and geography, pgvector adds AI vector search, pg_cron adds scheduled jobs. Supabase, Neon, AWS RDS, Google Cloud SQL and Azure all offer it as a managed service, so you rarely have to run the server yourself.
PostgreSQL pros and cons
Pros
- Very reliable, with strong guarantees that data stays consistent
- Handles relational and JSON data in the same database
- Huge extension ecosystem (PostGIS, pgvector, pg_cron)
- Permissive open-source licence, and every major cloud hosts it
Cons
- Needs a running server, plus care for backups, upgrades and tuning
- Each connection costs memory, so serverless apps usually need a connection pooler
- More to learn than SQLite for a small project
When to use PostgreSQL
Pick it when
- Almost any web or mobile backend with users, orders or accounts
- Data with clear relationships that must stay correct
- You want one database that can grow with the product
Skip it when
- The data lives on a single device (SQLite fits better)
- The main job is analytics over billions of events (look at ClickHouse)
PostgreSQL pricing
Open source
Free to run yourself. Managed hosting runs from free tiers (Supabase, Neon) to roughly $15 to $60 a month for a small dedicated server.
Approximate, checked September 2026.What the other tools cost
PostgreSQL vs the alternatives
- SQLite vs PostgreSQLBoth are relational and both speak SQL. The real difference is where they run: SQLite is a file inside your app, PostgreSQL is a server your app connects to.
- PostgreSQL vs MySQLThe two most popular open-source relational databases. Either will run a typical web app well; the differences show up at the edges.
- SQL vs NoSQL: PostgreSQL vs MongoDB vs FirestoreTables or documents is a choice that shapes how you model everything. Here is a SQL database next to the two document databases it is most often weighed against.
- PostgreSQL vs ClickHousePostgreSQL is built for running an app (many small reads and writes); ClickHouse is built for analysing one (a few enormous reads). Plenty of products use both.
Related terms
More in Databases and storage
Relational (SQL)