PostgreSQL (often "Postgres") is a free, open-source object-relational database system with more than 35 years of active development behind it. It grew out of the POSTGRES project at UC Berkeley in 1986 and has a reputation for standards compliance, correctness and extensibility.
Why people choose PostgreSQL
- Standards-compliant SQL — it follows the SQL standard more closely than most competitors.
- Extensible — you can add your own data types, operators, index methods, and languages. Extensions like PostGIS (geospatial), pg_trgm (fuzzy search), TimescaleDB and pgvector turn it into a specialised database without leaving Postgres.
- Rich type system — arrays,
JSONB, ranges,UUID, network addresses, full-text search vectors, composite and user-defined types. - MVCC — readers never block writers and writers never block readers.
- Reliable — write-ahead logging, point-in-time recovery, synchronous replication.
- Permissive licence — the PostgreSQL Licence is BSD-like, with no company owning the project.
Architecture in brief
Postgres uses a process-per-connection model, not threads:
Client ──► postmaster (listener)
│ forks
▼
backend process ──► shared buffers ──► data files
WAL buffers ──► WAL files
Background workers: checkpointer, autovacuum, WAL writer, stats collector
- Shared buffers cache table and index pages in memory.
- WAL (write-ahead log) records every change before it touches the data files, which is what makes crash recovery and replication possible.
- Autovacuum reclaims space from dead row versions left behind by MVCC.
Because each connection is an OS process, connections are relatively expensive — use a pooler such as PgBouncer in production rather than opening hundreds of direct connections.
PostgreSQL vs MySQL
| PostgreSQL | MySQL | |
|---|---|---|
| Model | Object-relational | Relational |
| Standards | Very close to the SQL standard | Several deviations |
| Complex queries | Stronger optimizer, CTEs, window functions for years | Improved a lot in 8.0 |
| Types | Arrays, JSONB, ranges, custom types | Mostly scalar + JSON |
| Extensions | First-class (CREATE EXTENSION) | Plugins, less common |
| Replication | Streaming + logical | Binlog-based |
| Typical use | Complex, analytical, correctness-critical | Read-heavy web workloads |
Both are excellent. Postgres tends to win when your data model is complex, your queries are analytical, or you need strict correctness; MySQL is common in simple, read-heavy web stacks.
Versions
Postgres releases one major version per year (15, 16, 17, 18 …) and supports each for five years. Major upgrades need pg_upgrade or a dump/restore; minor releases (17.1 → 17.2) are drop-in and should be applied promptly.