What is PostgreSQL?

TL;DR

PostgreSQL (Postgres) is the most advanced open-source relational database. It's ACID-compliant, supports JSON, full-text search, and custom extensions. Used by Apple, Instagram, Spotify, and thousands of startups. If you need a database that "just works" and scales, Postgres is the default choice in 2026.

The Big Picture

PostgreSQL stores your data in tables (like spreadsheets) and lets you query it with SQL. But unlike a spreadsheet, it guarantees your data stays consistent even when thousands of users read and write at the same time. It's been around since 1986 and is the most popular database among professional developers.

PostgreSQL architecture: clients connect to server, which manages databases with tables, indexes, and extensions
Explain Like I'm 12

Think of PostgreSQL as a super-organized filing cabinet for the internet. Your app needs to store user accounts, orders, messages — all kinds of data. PostgreSQL keeps it all organized in tables (like folders with rows of information), makes sure nothing gets lost or corrupted (even if the power goes out), and lets you find any piece of data instantly. It's free, it's been improved by thousands of developers for 38+ years, and almost every serious website uses it.

Why Choose PostgreSQL?

FeatureWhy It Matters
ACID ComplianceTransactions are atomic, consistent, isolated, and durable — your data never ends up in a broken state
Open SourceFree forever. No vendor lock-in. Massive community.
JSON + RelationalStore structured tables AND flexible JSON documents in the same database
ExtensionsPostGIS (geo), pgvector (AI embeddings), TimescaleDB (time-series), pg_cron (scheduled jobs)
Full-Text SearchBuilt-in search engine — no need for Elasticsearch for many use cases
ScalabilityHandles terabytes of data, thousands of concurrent connections
Standards ComplianceMost SQL-compliant database — your knowledge transfers everywhere

PostgreSQL vs. Other Databases

FeaturePostgreSQLMySQLSQLiteMongoDB
TypeRelationalRelationalEmbedded relationalDocument (NoSQL)
ACIDFullPartial (InnoDB)FullPer-document
JSON supportJSONB (indexed)JSON (basic)JSON1 extensionNative
ExtensionsRich ecosystemLimitedMinimalN/A
Best forGeneral purpose, complex queriesSimple web apps, read-heavyMobile, embedded, devFlexible schemas
LicensePostgreSQL (MIT-like)GPL / CommercialPublic domainSSPL

Who Uses PostgreSQL?

  • Apple — iCloud infrastructure
  • Instagram — Started on Postgres, still uses it at massive scale
  • Spotify — Metadata and user data
  • Reddit — Core data platform
  • Supabase, Neon, Vercel — Postgres-as-a-service platforms
  • Most startups in 2026 — The default database choice

What You'll Learn

Start Learning: Core Concepts →

Test Yourself

What does ACID stand for, and why does it matter?

Atomicity, Consistency, Isolation, Durability. It guarantees that database transactions are processed reliably — either all changes succeed or none do, data stays valid, concurrent transactions don't interfere, and committed data survives crashes.

Name two things PostgreSQL can do that MySQL can't (or can't do as well).

(1) Indexed JSONB — store and query JSON with GIN indexes at near-native speed. (2) Rich extensions — PostGIS for geospatial, pgvector for AI embeddings, custom types and operators. MySQL's extension ecosystem is much more limited.

When would you choose SQLite over PostgreSQL?

Choose SQLite for embedded/mobile apps, local development, single-user tools, or when you don't need a server. SQLite is a file-based database with zero configuration. Choose PostgreSQL when you need concurrent multi-user access, network access, or advanced features like full-text search and extensions.

Why is PostgreSQL considered "open source" while MongoDB's license is controversial?

PostgreSQL uses the PostgreSQL License (similar to MIT/BSD) — you can use, modify, and distribute it freely with no restrictions. MongoDB uses SSPL (Server Side Public License), which restricts offering MongoDB as a managed service without open-sourcing your entire stack. This is why many consider SSPL not truly open source.