PostgreSQL

PostgreSQL is a free, open-source object-relational database management system that uses and extends the SQL language. It grew out of the POSTGRES project begun in 1986 at the University of California, Berkeley, and is developed by the PostgreSQL Global Development Group.

Key facts

Type Object-relational database management system (DBMS)
Developer PostgreSQL Global Development Group
Origins POSTGRES project, University of California, Berkeley (1986)
First release as PostgreSQL Version 6.0, January 29, 1997
Written in C
License PostgreSQL License (permissive, similar to BSD and MIT)
Platforms Linux, Windows, macOS, BSD, Solaris
Latest major version PostgreSQL 19, released November 19, 2026
Supported versions 15 to 19 (as of November 2026)
Support period 5 years per major version
Default port 5432
Website postgresql.org

History

The project began in 1986 as POSTGRES, a research database led by Professor Michael Stonebraker at the University of California, Berkeley. Version 1 reached its first external users in June 1989; the Berkeley project ended with version 4.2. POSTGRES used its own query language, PostQUEL.

In 1994, Andrew Yu and Jolly Chen added an SQL interpreter, and the code was released on the web as the open-source Postgres95 with the psql terminal. In 1996 the project was renamed PostgreSQL to reflect its POSTGRES roots and SQL support, and numbering restarted at 6.0 to continue the Berkeley sequence. PostgreSQL 6.0 came out on January 29, 1997. The official FAQ calls “Postgres” a widely used nickname and prefers it over other short forms.

What PostgreSQL is used for

PostgreSQL is a general-purpose database that serves SQL queries from many clients at once. According to postgresql.org, production clusters manage many terabytes of data, and specialized systems manage petabytes.

  • Application backends: web and mobile apps and APIs. A Node.js service can connect through node-postgres (npm install pg), a Python program through Psycopg.
  • Relational and document data together: JSONB columns hold JSON documents next to ordinary columns.
  • Geospatial data: the PostGIS extension adds spatial types and functions.
  • AI applications: the pgvector extension stores embeddings and runs vector similarity search.
  • A base for platforms: cloud providers offer managed PostgreSQL, and Supabase gives every project a full Postgres database.

How it works

Server and connections

PostgreSQL runs as a server. A supervisor process, postmaster, listens on a TCP port (5432 by default) and starts a separate backend process for every client connection. Applications, the psql terminal and graphical tools such as pgAdmin send SQL and receive results.

Transactions and MVCC

Changes are grouped into ACID transactions: either all of them are applied or none, and a committed change survives a crash. The project says PostgreSQL has been ACID-compliant since 2001; it supports all SQL-standard isolation levels, including Serializable.

Concurrency is handled by multiversion concurrency control (MVCC). Each SQL statement sees a snapshot of the data as of a certain moment, so, as the documentation puts it, “reading never blocks writing and writing never blocks reading.” The old version of an updated or deleted row stays until VACUUM, usually run by the autovacuum daemon, reclaims the space.

Write-ahead log

Every change is first recorded in the write-ahead log (WAL), and only after those records reach permanent storage are the data files updated. After a crash, the server replays the log; the same log enables point-in-time recovery and replication.

Extensions

New data types, functions, operators and index methods can be added without changing the core: they are packaged as an extension and loaded with CREATE EXTENSION. Stored functions can be written in PL/pgSQL, Perl, Python, Tcl and other languages.

Notable features

  • JSONB: a binary JSON type added in version 9.4 (2014). It is slightly slower to write than plain json but much faster to process and can be indexed.
  • Full-text search: tsvector and tsquery types, the @@ match operator, dictionaries with stemming, and indexes to speed it up.
  • Indexes: B-tree (the default) and Hash; GiST and SP-GiST for geometric and other complex data; GIN for values with many components, such as arrays, JSONB and text; BRIN for huge tables whose values follow the physical row order.
  • Partitioning: a large table can be split into partitions by range, list or hash; declarative partitioning arrived in version 10 (2017).
  • Replication: asynchronous and synchronous replication to standby servers, plus logical publish/subscribe replication since version 10, which works between different major versions.
  • Extensions: PostGIS for geodata; pgvector, which adds a vector type, HNSW and IVFFlat indexes and distance operators; postgres_fdw for querying another PostgreSQL server.

Versions and support

A major version comes out about once a year, and minor releases with bug and security fixes at least every three months. Since version 10, the first number is the major version (19) and the second the minor release (19.1). Each major version is supported for five years, then receives a final minor release and reaches end of life.

Status as of November 2026:

Version Latest minor First release Final release (planned)
19 19.0 November 19, 2026 November 19, 2031
18 18.7 September 25, 2025 November 14, 2030
17 17.12 September 26, 2024 November 8, 2029
16 16.16 September 14, 2023 November 9, 2028
15 15.20 October 13, 2022 November 11, 2027

PostgreSQL 14 reached end of life on November 12, 2026. Version 19 added REPACK (CONCURRENTLY), which reclaims unused table space without blocking reads or writes, the pg_plan_advice extension for stabilizing query plans and logical replication of sequences. Version 18 (September 2025) introduced asynchronous I/O, the uuidv7() function and OAuth authentication.

A minor upgrade only requires new binaries and a restart; a new major version requires pg_upgrade or a dump and restore.

-- A table with ordinary columns and a JSONB column
CREATE TABLE articles (
    id         bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
    title      text NOT NULL,
    body       text NOT NULL,
    meta       jsonb NOT NULL DEFAULT '{}',
    created_at timestamptz NOT NULL DEFAULT now()
);

INSERT INTO articles (title, body, meta) VALUES
  ('Getting started', 'Install the server and create your first database.',
   '{"lang": "en", "tags": ["sql", "beginner"]}'),
  ('Indexing JSONB', 'GIN indexes speed up containment queries on jsonb columns.',
   '{"lang": "en", "tags": ["jsonb", "index"]}');

-- A GIN index for JSONB containment queries
CREATE INDEX articles_meta_idx ON articles USING GIN (meta);

-- Articles tagged "jsonb"
SELECT id, title, meta->>'lang' AS lang
FROM articles
WHERE meta @> '{"tags": ["jsonb"]}';

-- Full-text search with the English dictionary
SELECT title
FROM articles
WHERE to_tsvector('english', title || ' ' || body)
      @@ to_tsquery('english', 'index & queries');

The @> operator checks whether one JSON value contains another, and the GIN index helps answer it without scanning every row; ->> extracts a field as text. Both queries return “Indexing JSONB”: the english dictionary reduces “Indexing” and “indexes” to the lexeme index, so different word forms match.

Pros and cons

Pros:

  • The permissive license allows free use in commercial and proprietary software.
  • Reliability: ACID transactions, WAL, point-in-time recovery and replication.
  • Close adherence to the SQL standard: at least 170 of the 177 mandatory SQL:2023 Core features as of version 19, according to the project.
  • Rich data types and extensibility.
  • A predictable yearly release cycle with five years of support.

Cons:

  • A server has to be installed, configured, monitored and backed up.
  • Each connection gets its own process, so applications with many connections usually go through a connection pool.
  • Under MVCC, old row versions accumulate, and autovacuum must keep up on busy tables.
  • Major upgrades have to be planned and tested.

Compared with MySQL and SQLite

MySQL is also a mature open-source client-server DBMS with a large ecosystem. Oracle distributes it under the GPLv2 and sells a commercial license to companies that embed it in their products; the PostgreSQL License has no such conditions. For a typical web application both work, and the choice often depends on the team’s experience and hosting.

SQLite is a public-domain library built into the application: there is no server, and a whole database lives in a single file, which suits mobile and desktop apps and tests. PostgreSQL is built for many simultaneous clients over a network, at the cost of running a server.

How to get started

  1. Install it. The download page lists packages for Linux, BSD and Solaris and installers for Windows and macOS. The EDB installer includes the server and the pgAdmin graphical tool; on a Mac, Postgres.app and Homebrew are alternatives.
  2. Or use Docker. The official postgres image needs only the POSTGRES_PASSWORD variable; the default user is postgres:
docker run --name pg -e POSTGRES_PASSWORD=secret -p 5432:5432 -d postgres:19
docker exec -it pg psql -U postgres
  1. Or pick a managed service such as Amazon RDS for PostgreSQL, Google Cloud SQL, Azure Database for PostgreSQL or Supabase, which take over installation, upgrades and backups. Check which versions and extensions a provider supports.
  2. Learn the basics with the tutorial and reference at postgresql.org/docs, and read the release notes before every major upgrade.

Sources

  1. About PostgreSQL — PostgreSQL Global Development Group (accessed 28 November 2026)
  2. Versioning Policy — PostgreSQL Global Development Group (accessed 28 November 2026)
  3. A Brief History of PostgreSQL (PostgreSQL 19 documentation) — PostgreSQL Global Development Group (accessed 28 November 2026)
  4. PostgreSQL 6.0 Release Notes — PostgreSQL Global Development Group (accessed 28 November 2026)
  5. PostgreSQL 19 Released! — PostgreSQL Global Development Group (accessed 28 November 2026)
  6. Concurrency Control: Introduction (PostgreSQL 19 documentation) — PostgreSQL Global Development Group (accessed 28 November 2026)
  7. JSON Types (PostgreSQL 19 documentation) — PostgreSQL Global Development Group (accessed 28 November 2026)
  8. pgvector: open-source vector similarity search for Postgres — pgvector (GitHub) (accessed 28 November 2026)

Also available in: Русский · Қазақша