PostgreSQL
The open-source relational database that most new projects start on, extensible enough to grow into many niches.
- What it is
- Relational databases
- Type
- Open source
- Made by
- PostgreSQL Global Development Group
- License
- PostgreSQL License
- Facts checked
- 5 October 2026
What it is
PostgreSQL is a client-server SQL database. A supervisor process called the postmaster listens for connections and starts one operating-system process for each client. Concurrency comes from MVCC: an UPDATE writes a new version of the row instead of overwriting it, so each query sees a consistent snapshot, and reads never block writes. The cost is that old row versions pile up until VACUUM, usually run by the autovacuum daemon, reclaims them.
What sets it apart is how much it lets you add. Extensions plug new data types, index types and functions into the server, so PostGIS adds geospatial queries, pgvector adds vector search and TimescaleDB adds time-series storage, all with the same SQL and transactions. Built in, it has jsonb documents with GIN indexes, full-text search, window functions and serializable transactions. A new major version ships about once a year and gets five years of fixes.
Why teams pick it
- Strict, standards-minded SQL with ACID transactions up to serializable isolation
- Extensions such as PostGIS, pgvector and TimescaleDB turn one database into many
jsonbwith GIN indexes covers many document-store use cases- Permissive BSD-style licence, and every major cloud offers it as a managed service
Watch out for
- One process per connection: thousands of clients need a pooler such as PgBouncer
- MVCC leaves dead rows behind; autovacuum must keep up, or tables bloat and transaction IDs near wraparound
- Writes scale up on one primary; scaling them out needs sharding through extensions or other systems
- Major-version upgrades need
pg_upgrade, a dump and restore, or replication to a new server, not just new binaries
Alternatives
What all relational databases have in common →
CedarDBCommercialA PostgreSQL-compatible database rebuilt from scratch at TU Munich, running transactions and analytics on one copy of the data on a single server.
CloudNativePGOpen sourceA Kubernetes operator that runs highly available PostgreSQL with no Patroni and no StatefulSets: the Kubernetes API itself holds the cluster’s state.
PatroniOpen sourceA Python agent beside each Postgres server that elects one primary through etcd, Consul, ZooKeeper or Kubernetes, and fails over when it dies.
Percona OperatorsOpen sourceFour free Kubernetes operators from Percona that run its builds of MySQL, PostgreSQL and MongoDB, each using the engine’s own replication and backup tools.
PGO (Crunchy Postgres for Kubernetes)Open sourceCrunchy Data’s Postgres operator: Patroni in every pod for failover, pgBackRest for backups, and a declarative `PostgresCluster` resource on top.
ScramDBCommercialA brand-new, closed-source database that speaks the PostgreSQL protocol and promises transactions, analytics and vector search on one copy of the data; first builds shipped in summer 2026.How it fits with other technologies
What uses PostgreSQL
- Cis the implementation language ofPostgreSQL
- Active Record (Ruby on Rails)reads and writes model rows inPostgreSQL
- Entity Framework Corequeries through the Npgsql providerPostgreSQL
- Hibernate ORMgenerates SQL and maps rows fromPostgreSQL
- Prisma ORMgenerates queries and migrations forPostgreSQL
- SQLAlchemygenerates SQL through a dialect forPostgreSQL
- Tortoise ORMconnects with asyncpg or psycopg toPostgreSQL
- Drizzle ORMbuilds typed SQL forPostgreSQL
- jOOQgenerates classes from and queriesPostgreSQL
- Dapperruns hand-written SQL againstPostgreSQL
- Evidencequeries live through a direct connectorPostgreSQL
- Dokkuprovisions databases with a plugin forPostgreSQL
- Fly.iooffers managed databases runningPostgreSQL
- Herokuruns managed databases ofPostgreSQL
- Renderruns managed databases onPostgreSQL
- Beta9keeps persistent state inPostgreSQL
- K3scan keep cluster state, via kine, inPostgreSQL
- Klutchprovisions, through anynines backends,PostgreSQL
- Akkapersists entity events (R2DBC) inPostgreSQL
- Apache Pekkopersists entity events (JDBC, R2DBC) inPostgreSQL
- GraphQLis generated by pg_graphql insidePostgreSQL
- RESTis generated by PostgREST fromPostgreSQL
- BullMQcan keep jobs in (v6 and later)PostgreSQL
- pgmqruns as SQL functions insidePostgreSQL
- PgQueruns as plain PL/pgSQL insidePostgreSQL
- PgQueuerkeeps jobs, locks and its log inPostgreSQL
- Apache Kafkacaptures row changes (Debezium) fromPostgreSQL
- Apache Flinkcaptures row changes (Flink CDC) fromPostgreSQL
- Arroyokeeps its cluster configuration inPostgreSQL
- Felderareads CDC from and writes view changes toPostgreSQL
- ksqlDBpulls tables via a JDBC connector fromPostgreSQL
- Pathwaywrites results to (CDC reads need a key)PostgreSQL
- Quix Streamssinks processed rows intoPostgreSQL
- Redpanda Connectstreams row changes (CDC) out ofPostgreSQL
- RisingWavespeaks the protocol of, reads CDC fromPostgreSQL
- Streamlingkeeps offsets and lookup tables inPostgreSQL
- Prefectkeeps flow runs, logs and events inPostgreSQL
- Temporalcan keep workflow state and history inPostgreSQL
- EMQXwrites MQTT data intoPostgreSQL
- HiveMQwrites MQTT messages intoPostgreSQL
- PGSTY Silostores backups forPostgreSQL
- pgBackRestbacks up and archives WAL forPostgreSQL
- WAL-Garchives WAL and base backups ofPostgreSQL
- Alibaba Cloud PolarDBis built on and compatible withPostgreSQL
- CedarDBspeaks the wire protocol and SQL ofPostgreSQL
- CloudNativePGruns highly available clusters ofPostgreSQL
- CockroachDBspeaks the wire protocol ofPostgreSQL
- Neonruns with separated storagePostgreSQL
- Patronielects a primary and fails over forPostgreSQL
- Percona Operatorsdeploy Percona’s builds ofPostgreSQL
- PGO (Crunchy Postgres for Kubernetes)runs highly available clusters ofPostgreSQL
- PlanetScaleruns managed clusters ofPostgreSQL
- ScramDBspeaks the wire protocol ofPostgreSQL
- Tursospeaks, experimentally, the wire protocol ofPostgreSQL
- Valkeycaches query results in front ofPostgreSQL
- Hyperdrivepools connections and caches reads forPostgreSQL
- kdb+speaks, through pgwire, the protocol ofPostgreSQL
- TimescaleDBruns as an extension insidePostgreSQL
- pg_trgmis a contrib extension forPostgreSQL
- KurrentDBcan copy events, with a sink connector, intoPostgreSQL
- Apache Arrowtalks to through its ADBC driverPostgreSQL
- JSONis stored and indexed as `jsonb` inPostgreSQL
- DuckLakekeeps its catalog inPostgreSQL
- Apache Polariskeeps catalogs, grants and policies inPostgreSQL
- Lakekeeperkeeps catalog state and secrets inPostgreSQL
- Project Nessiekeeps its commit history inPostgreSQL
- Unity Catalogkeeps open-source server metadata inPostgreSQL
- Apache Zeppelinqueries, via its JDBC interpreter,PostgreSQL
- chDBimports and exports files forPostgreSQL
- DuckDBcan query and write toPostgreSQL
- Hotdataingests tables fromPostgreSQL
- Ibiscompiles queries to SQL forPostgreSQL
- Spice.ai OSSfederates and replicates, via CDC, fromPostgreSQL
- Trinocan query and join live data inPostgreSQL
- Alibaba Cloud Hologresspeaks the wire protocol and SQL ofPostgreSQL
- Apache Druidkeeps cluster metadata inPostgreSQL
- Fireboltfollows the SQL dialect ofPostgreSQL
- Pivotspeaks the wire protocol ofPostgreSQL
- Tinybirdcan copy tables, via a table function, fromPostgreSQL
- Dremiofederates queries toPostgreSQL
- Tiger Lakestreams changes by logical replication fromPostgreSQL
- Airbytereplicates tables with CDC fromPostgreSQL
- Artiestreams WAL changes out ofPostgreSQL
- Bruiningests from and runs SQL assets onPostgreSQL
- Dagsterkeeps runs and event logs inPostgreSQL
- dbtbuilds models in (v1 adapter)PostgreSQL
- Estuarycaptures WAL changes (CDC) fromPostgreSQL
- Fivetranreads changes from the WAL ofPostgreSQL
- Meltanoextracts from and loads intoPostgreSQL
- OLakereplicates tables with CDC (pgoutput) fromPostgreSQL
- Cubecompiles metric queries to SQL forPostgreSQL
- Grafanacan query or store its dashboards inPostgreSQL
- Logstashpolls rows on a schedule via JDBC fromPostgreSQL
- HashiCorp Vaultcreates short-lived database users inPostgreSQL
- HashiCorp Boundarykeeps its configuration and state inPostgreSQL
- RSigmaconverts rules into SQL hunts forPostgreSQL
Relational columns and an indexed JSON document in one table · sql
CREATE TABLE orders (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
customer_id bigint NOT NULL,
details jsonb NOT NULL,
created_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX orders_details_idx ON orders USING gin (details jsonb_path_ops);
-- the containment operator @> can use the GIN index
SELECT id, customer_id, details->>'carrier' AS carrier
FROM orders
WHERE details @> '{"status": "shipped"}'
AND created_at > now() - interval '7 days';See it in a real stack
Small lakehouse on DuckLake →Worth exploring
FOR UPDATE SKIP LOCKED queue, then shows what to add when a job has several steps: Absurd stores each step’s result in Postgres, so a crashed worker resumes from the last checkpoint. The author calls it a fit for small and medium projects, not high volume.SKIP LOCKED, the weaker READ COMMITTED isolation unless a queue needs global limits, partial indexes on waiting rows only, and an index that matches the dequeue order. DBOS wrote it about its own product, but the techniques apply to any Postgres queue.Benchmarks
How to read a benchmark →Where it came from1986–2025
By the mid-1980s, relational databases handled business records well, but engineering work such as CAD, geographic data and graphics needed things like polygons and lines that the systems couldn’t store efficiently. Michael Stonebraker had led the Ingres project at UC Berkeley, but its code had been “hacked up enough” that adding major new features was extremely difficult. So in 1986 he and Lawrence Rowe designed a successor, POSTGRES (“post-Ingres”), whose goals included letting users add their own data types, operators and access methods. Implementation began that year, funded by DARPA, the Army Research Office, the NSF and ESL, Inc.
Berkeley released versions 1 to 4.2 from 1989, all using the project’s own query language, PostQUEL. As the research wound down, students Andrew Yu and Jolly Chen swapped PostQUEL for SQL in 1994 and released the result as Postgres95. Volunteers outside Berkeley adopted the code, renamed it PostgreSQL in 1996 and released version 6.0 in January 1997. They have run it ever since as the PostgreSQL Global Development Group.
A permissive licence and an extensible core made it a common starting point for commercial databases and for extensions such as PostGIS. In 2010 Heroku made it the default database on its platform, which helped frameworks such as Ruby on Rails and Django recommend it too.
Why it’s built this way
- Users can add types, operators and index methods
- Engineering data could be faked with plain tables, but the 1986 design paper called the resulting performance unacceptable. Making the type system and access methods pluggable is why PostGIS, pgvector and TimescaleDB can exist as extensions.
- One operating-system process per connection
- The designers knew a single server process would perform better, but it meant writing what amounted to a special-purpose operating system. With a small team, they chose the simpler process-per-user model on Unix, which is why PostgreSQL still needs a pooler for thousands of clients.
- Write new row versions instead of overwriting
- POSTGRES kept every record as a chain of versions stamped with transaction IDs, which simplified crash recovery and allowed “as of” queries. PostgreSQL later added a write-ahead log and dropped time travel, but kept the versions for MVCC, and with them the need for
VACUUM.
Timeline
- 1986
POSTGRES project begins at UC Berkeley under Michael Stonebraker
- 1989
Version 1 released to outside users
- 1994
Andrew Yu and Jolly Chen add SQL, creating Postgres95
- 1996
Renamed PostgreSQL; version 6.0 follows in January 1997
- 2010
9.0 adds built-in streaming replication and hot standby
- 2014
9.4 adds
jsonbwith GIN indexing - 2025
PostgreSQL 18 adds asynchronous I/O
- PostgreSQL documentation: A brief history of PostgreSQL
- Stonebraker and Rowe: The Design of POSTGRES (1986)
- Joseph Hellerstein: Looking Back at Postgres (2019)
- PostgreSQL 6.0 release notes (January 1997)
- PostgreSQL 9.0 release announcement (2010)
- PostgreSQL 9.4 release announcement (2014)
- PostgreSQL 18 release announcement (2025)
Sources19 · facts checked 5 October 2026
- PostgreSQL License
- PostgreSQL versioning policy
- PostgreSQL: About (feature list)
- PostgreSQL docs: How connections are established
- PostgreSQL docs: Introduction to MVCC
- PostgreSQL docs: Routine vacuuming
- PostgreSQL docs: Packaging related objects into an extension
- PostgreSQL docs: JSON types, jsonb indexing
- PostgreSQL docs: Window functions
- PostgreSQL docs: High availability, load balancing and replication
- PostgreSQL docs: Upgrading a PostgreSQL cluster
- PgBouncer: lightweight connection pooler for PostgreSQL
- PostGIS: spatial and geographic objects for PostgreSQL
- pgvector: open-source vector similarity search for Postgres
- TimescaleDB: time-series as a PostgreSQL extension
- Citus: a PostgreSQL extension that shards tables across nodes
- Amazon RDS for PostgreSQL
- Google Cloud SQL for PostgreSQL
- Azure Database for PostgreSQL overview