The world's most advanced open-source relational database
A free, open-source relational database with deep SQL support, native JSON, and hundreds of extensions.
The default backend behind most new SaaS apps thanks to its depth, ACID guarantees, and mature ecosystem.
| Category | Relational |
| Pronunciation | Pronounced "post-gres-Q-L" (four syllables). Commonly shortened to "Postgres" in conversation. |
| First released | 1996 |
| Latest release | 18.4 (May 2026) |
| License | PostgreSQL License |
| Written in | C |
| Runs on | Linux, Macos, Windows, Bsd |
| Deployment | Self-hosted, Managed |
| Wire protocol | postgresql |
| Query dialect | sql, plpgsql |
| Consistency | strong |
| ACID support | native |
| JSON support | native |
| Full-text search | native |
| Vector support | extension |
| HA model | primary-standby |
| Managed by | amazon-rds, google-cloud-sql, azure-database, neon, supabase, crunchy-bridge, aiven, tembo, timescale |
PostgreSQL, or Postgres for short, is a free open-source relational database. It stores data in tables, speaks SQL, and enforces ACID on transactions. What sets it apart from other relational databases is depth. It supports JSON as a native data type, geographic queries through the PostGIS extension, full-text search, and vector similarity search through pgvector. One engine covers workloads that used to need a stack of specialized ones.
It started as a research project at UC Berkeley in 1986, became Postgres95 in 1995, then took the PostgreSQL name in 1996 when SQL support landed. Today the PostgreSQL Global Development Group runs the project. No owning company, no VC-backed vendor calling the shots. That model is a big reason Postgres has stayed reliably open source for four decades while other databases like MongoDB, Redis, and Elasticsearch have moved to more restrictive licenses.
Postgres today runs everything from small embedded workloads to petabyte-scale analytics. Instagram, Reddit, Skype, Notion, and Spotify all run it in production. Managed services like AWS RDS, Google Cloud SQL, Supabase, and Neon have made it the default database for most new applications. By community adoption, it is the fastest-growing traditional database.
PostgreSQL is a client-server database. A single postmaster process listens on a TCP port (default 5432) and forks a dedicated backend for each incoming connection. Every backend handles one client at a time, which is why a connection pooler like PgBouncer or pgcat is essential in production. Thousands of short-lived connections would otherwise spawn thousands of processes.
Each SQL query goes through parse, rewrite, plan, and execute. The cost-based planner uses table statistics, index availability, and expected row counts to pick the cheapest access path. You inspect its decisions with EXPLAIN and EXPLAIN ANALYZE, which is where most performance work starts.
Data lives in heap tables, which are unordered files of row-versioned tuples for MVCC. Writes go to the Write-Ahead Log first for durability, then to the heap pages. The WAL also doubles as the replication stream, so physical replicas apply the same WAL records the primary writes. Background processes handle checkpointing, autovacuum, the writer, the wal-writer, and the stats collector. Extensions plug in through hooks. pgvector adds an HNSW index type, PostGIS adds new data types and operators, and TimescaleDB reshapes the planner for time-series workloads.
Postgres organizes data into tables of rows and columns, grouped into schemas that act as namespaces. Every table has a strict column definition and types are enforced at write time. Schemas let you group related tables and control permissions at the group level, which is useful for multi-tenant setups.
Every operation runs inside a transaction, and multi-statement transactions are ACID: atomic (all or nothing), consistent (constraints always hold), isolated (concurrent transactions don't interfere), and durable (committed data survives crashes). Isolation ranges from Read Committed to Serializable.
Postgres uses Multi-Version Concurrency Control: writes don't block reads and vice versa, and each transaction sees a consistent snapshot. The tradeoff is that old row versions accumulate and have to be cleaned up by VACUUM. In practice you let autovacuum handle this in the background without much intervention.
Postgres has two JSON column types. json stores raw text, jsonb parses and stores in a binary format. Use jsonb in most cases. It supports GIN indexing for fast key and value lookups, operators like @> for contains and -> for get key, and often beats dedicated document stores at moderate scale.
B-tree is the default index, but Postgres also ships GIN for arrays and JSONB, GiST for geometric and range types, BRIN for very large sorted tables, and Hash. The extension world is where it really opens up: pgvector for vector search, PostGIS for geospatial, TimescaleDB for time-series, pg_stat_statements for query profiling.
The Write-Ahead Log records every change before it hits disk. Physical replication ships raw WAL records to standby servers for byte-identical replicas. Logical replication sends row-level changes to subscribers, useful for cross-version upgrades. Streaming replication with a hot standby is the standard HA setup.
Live GitHub adoption — updated daily
A handful of the companies running it in production
Payments, orders, and user accounts, anywhere a single row must never desync. Decades of ACID tooling make Postgres the default when correctness beats raw throughput.
Window functions, CTEs, lateral joins, and materialized views. The Postgres planner handles multi-join analytical workloads that trip up simpler engines like MySQL and MariaDB.
jsonb columns give you MongoDB-style flexibility inside a relational schema. You can join documents to tables, index nested keys, and query both together in a single round trip.
PostGIS is the default for spatial SQL, and pgvector puts similarity search right next to your existing data. Both behave like any other Postgres feature, indexed and queryable.
Postgres runs one backend process per connection and hits disk before serving reads. That costs you microseconds where Redis and Memcached cost you nanoseconds on the same box.
ClickHouse and dedicated time-series engines like InfluxDB and VictoriaMetrics ingest billions of rows a day faster than Postgres. TimescaleDB narrows the gap but not fully.
Vanilla Postgres scales up before it scales out. For horizontal writes across regions, look at CockroachDB, YugabyteDB, or TiDB, all Postgres wire-compatible so most drivers work.
Postgres runs as a persistent server process. For embedded workloads like edge apps or offline-first clients, SQLite and DuckDB are simpler and start cold much faster.
Head-to-head specs against the top 5 alternatives
| Spec | ||||||
|---|---|---|---|---|---|---|
| Identity | ||||||
| License | PostgreSQL License | GPLv2 | Public Domain | Microsoft Commercial License | SSPL | Oracle Commercial License |
| First released | 1996 | 1995 | 2000 | 1989 | 2009 | 1979 |
| Wire protocol | postgresql | mysql | tds | mongodb | oracle-net | |
| Query dialect | sql, plpgsql | sql | sql | sql, t-sql | mql | sql, pl/sql |
| Capabilities | ||||||
| ACID | Native | Native | Native | Native | Native | Native |
| Consistency | Strong | Strong | Strong | Strong | Tunable | Strong |
| JSON | Native | Native | Native | Native | Native | Native |
| Vector | Extension | Native | Extension | Native | Native | Native |
| Full-text | Native | Native | Native | Native | Native | Native |
| HA model | Primary-standby | Multi-master | None | Primary-standby | Raft | Multi-master |
| Ecosystem | ||||||
| Managed providers | 9 | 8 | 2 | 3 | 1 | 2 |
| ORM support | 10 | 8 | 8 | 7 | 6 | 5 |
| Extensions | 10 | 4 | 5 | 6 | — | 5 |
| Use cases | ||||||
| Best for | General-purpose OLTP, complex queries with advanced SQL, geospatial data with PostGIS, and applications requiring strong ACID compliance | Web applications, SaaS platforms, and high-throughput OLTP workloads | Embedded applications, mobile apps, local data storage, edge computing, and prototyping | Enterprise .NET applications, business intelligence, and Windows-centric data platforms | Flexible-schema applications, content management, real-time analytics, and mobile/IoT backends | Mission-critical enterprise OLTP/OLAP workloads requiring maximum availability and scalability |
| Not ideal for | Extreme write-heavy workloads at massive horizontal scale, simple key-value caching, or real-time streaming without extensions | Complex analytical queries or workloads requiring advanced SQL features like CTEs with recursive optimization | High-concurrency write-heavy workloads, multi-user client-server applications | Cost-sensitive projects or teams without Windows/Azure ecosystem investment | Highly relational data with complex joins or strict referential integrity requirements | Small projects or startups due to high licensing costs and operational complexity |
Install Postgres locally, connect with psql, and run a first query. Under a minute if you have Docker.
docker run --name postgres -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:17# macOS
brew install postgresql@17 && brew services start postgresql@17
# Ubuntu/Debian
sudo apt install postgresql-17 && sudo systemctl start postgresqlpsql postgresql://postgres:secret@localhost:5432/postgresCREATE TABLE users (
id SERIAL PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
created_at TIMESTAMPTZ DEFAULT NOW()
);
INSERT INTO users (email) VALUES ('[email protected]');
SELECT * FROM users;That is a working install. Connect from any language with the standard drivers, or reach for a GUI when you want to browse tables and run queries visually.
Connect to PostgreSQL in 30 seconds. Browse tables, run queries, and edit rows visually — on localhost, self-hosted, or cloud.
Open PostgreSQL in 1bench