Postgre SQL

Agent AI
Vector DB
%alireza rashidi data science%
Machine vs Deep Learning
%alireza rashidi data science%
PostgreSQL — The World’s Most Advanced Open Source Database
The Architect’s Choice

Not just a database. A platform.

In a world of specialized tools — one DB for cache, one for documents, one for spatial — PostgreSQL is the Swiss Army knife that actually cuts steel. It started in academia at UC Berkeley and took over the enterprise, because you don’t just store data in Postgres: you program it.

New data types, new index methods, functions in a dozen languages, vectors for AI — all inside the engine that already holds your rows. ACID compliant. Open source. Extensible.

01The universal engine

The database that outlived the hype cycle#

Every year a new database promises to replace it. Every year, the survey says the same thing: developers keep choosing the elephant.

Developer adoption, 2018 → 2026
0% 20% 40% 60% 2018 2019 2020 2021 2022 2023 2024 2025 2026 Usage share (%) Stack Overflow developer surveys 2018–2025; 2026 extrapolated. Direction is real — the crossing already happened.
PostgreSQLMySQL

How to read this: PostgreSQL didn’t win by being fashionable — it won by compounding. Each survey, more developers use it and more developers who use it refuse to leave.

40 years of active development since the 1986 POSTGRES project
18 current major version — released September 2025
faster storage reads with PG 18’s new async I/O subsystem
400+ production-grade extensions in the ecosystem
02Evolution

Faster every single year#

Unlike legacy systems, Postgres gets significantly faster with every major release — and the upgrades keep getting easier to take.

Performance per release
0 50 100 150 200 PG 14 100 PG 15 118 PG 16 134 PG 17 150 PG 18 172 Relative index per major release (PG 14 = 100) — illustrative; PG 18 adds async I/O, up to 3× on storage reads.
Read throughput index

How to read this: vacuum efficiency, parallel queries, and now async I/O mean the same hardware serves more traffic each year. Upgrading is a performance strategy, not just hygiene.

Capability radar
Reliability JSON/NoSQL GIS/Spatial Read speed Write speed Features Capability profile versus a generic relational database — illustrative.
PostgreSQLTypical RDBMS

How to read this: a generic relational database wins nothing here except maybe raw write speed on narrow benchmarks — and gives up JSON, spatial, and extensibility to get it.

03The depth

Four reasons it keeps winning#

Reliability you can build a bank on, documents without a second database, an extension ecosystem with no rival, and a current release that actually matters.

Three mechanisms make that promise structural rather than aspirational:

The guarantees

  • ACID: Atomicity, Consistency, Isolation, Durability. If a transaction says “Commit,” it is written to disk. No “maybe.”
  • MVCC: Multi-Version Concurrency Control — readers don’t block writers, writers don’t block readers.

The insurance policy

  • WAL: Write-Ahead Logging records every change before it touches the table. If power fails, the log replays the truth.
  • Point-in-time recovery: rewind the database to any second before the mistake happened.
Boring is a feature when it holds your money.This is why banks, governments, and hospitals keep choosing the elephant.

With JSONB you store binary JSON, index specific keys, and query it as fast as a document store — inside the same engine that runs your relational schema, with the same transactions and backups.

query.sql
-- Find users who have "admin" role in JSON
SELECT id, email FROM users
WHERE metadata @> '{"role": "admin"}';

-- Update a specific key inside the JSON
UPDATE users
SET metadata = jsonb_set(metadata, '{login}', '42')
WHERE id = 101;
One engine, four workloads
1 DB four workloads Common data usage in modern applications — illustrative mix.
Structured (tables) · 60JSONB (documents) · 25Geospatial · 10Arrays / other · 5

How to read this: most production apps are mostly relational with islands of documents, maps, and arrays. Postgres covers all four without a second database to babysit.

The extension API is the deepest moat in databases: new data types, index methods, and entire subsystems, without forking the core.

The extension ecosystem
0 25 50 75 100 PostGIS 95 pgvector 88 pg_stat_statements 80 TimescaleDB 60 pg_cron 45 Ecosystem adoption index — illustrative; pgvector’s rise is the AI effect.

How to read this: PostGIS made Postgres the world’s GIS standard; pgvector made it the default vector store for a generation of AI apps that didn’t want another moving part.

The classics

  • PostGIS — the spatial standard: distances, areas, and intersections on a globe. Nothing else is close.
  • TimescaleDB — time-series: high-frequency IoT, crypto, and metrics data, optimized.

The AI upgrade

  • pgvector: vector embeddings for semantic search, directly in your primary database. No separate vector DB required for most workloads.
  • pg_stat_statements: the query-level truth about what your database actually does all day.

Released 25 September 2025, PostgreSQL 18 is the current major version, and PG 19 is already in beta (Beta 2 shipped July 2026) with GA expected September–October 2026. The headline features:

Performance

  • Async I/O (AIO): up to 3× faster reads from storage — sequential scans, bitmap heap scans, and VACUUM all benefit.
  • Skip scans: multicolumn B-tree indexes now serve DISTINCT and selective queries far more often.
  • Faster pg_upgrade: planner statistics survive the upgrade; parallel checks and –swap cut maintenance windows.

Developer features

  • Virtual generated columns (default): computed at read time — no storage, no write overhead.
  • Temporal constraints: WITHOUT OVERLAPS prevents double-bookings at the database level.
  • UUIDv7: timestamp-ordered UUIDs via uuidv7() — better index locality than v4.
  • OLD/NEW in RETURNING: audit trails without triggers.
Also note: MD5 password auth is deprecated — move to SCRAM-SHA-256, which is now the default.OAuth 2.0 authentication support landed too.
04When to use what

Honest boundaries#

Postgres is the default answer — not the universal one.

Use caseWhy Postgres?Alternative
Core banking / financeStrict ACID compliance, accuracyOracle (costly)
General web app (SaaS)JSONB flexibility + relations for usersMySQL (fewer features)
Geospatial / mapsPostGIS is the industry standardNone close
AI semantic searchpgvector inside the primary DBDedicated vector DB (at huge scale)
Simple caching / queues(Overkill)Redis / Valkey
05Choosing

How I would choose#

Default to Postgres until the workload proves you wrong. The exceptions are real but rarer than the hype suggests.

1
Start every new application on Postgres.

Relational core, JSONB islands, one backup story.

2
Maps or location? Add PostGIS, not a new database.

It is the standard the specialists measure against.

3
AI features? Add pgvector before shopping for a vector DB.

One less system to operate is worth more than benchmark points.

4
Caching and ephemeral queues? That’s when you leave.

Redis and friends exist for a reason — use them for that reason.

The quiet truth: most “we outgrew Postgres” stories are actually “we never tuned Postgres” stories. Master the elephant first; specialize only where it genuinely hurts.

06Grounding

Sources#

The adoption chart is an editorial synthesis of survey trends; the version claims are not. Here is what they rest on.

  1. PostgreSQL 18 — Release Notes. The canonical feature list: asynchronous I/O subsystem, virtual generated columns (default), temporal constraints (WITHOUT OVERLAPS), uuidv7(), OLD/NEW in RETURNING, skip scans on multicolumn B-tree indexes, MD5 password deprecation. postgresql.org
  2. “PostgreSQL 18 Released!” — official announcement, 25 September 2025. Source of the “up to 3× faster storage reads” figure and the pg_upgrade improvements (statistics preservation, parallel checks, –swap). Also the project’s own “over 40 years” framing of its Berkeley history. postgresql.org
  3. “PostgreSQL 19 Beta 2 Released!” — 16 July 2026. Feature-frozen preview; GA expected around September–October 2026. SQL/PGQ property-graph queries, REPACK CONCURRENTLY, parallel autovacuum. postgresql.org
  4. Stack Overflow Developer Survey 2025. Basis for the adoption chart: PostgreSQL has led the “most popular databases” ranking among professional developers for several consecutive surveys; the 2026 point is extrapolated and labelled as such. survey.stackoverflow.co
  5. pgvector — open-source vector similarity search for Postgres. The extension behind the “AI semantic search in your primary database” claim; HNSW and IVFFlat indexes, half-precision and sparse vectors. github.com/pgvector
  6. PostgreSQL Documentation — JSON Types. Reference for JSONB storage, the containment operator (@>) and jsonb_set used in the code example. postgresql.org
  7. PostGIS. The spatial extension that made PostgreSQL the de-facto standard open-source GIS database. postgis.net
The relational data platform that survives every hype cycle.
Part of Ali’s Infrastructure Series · Updated 6 August 2026. Survey trend from Stack Overflow data; benchmark indices are illustrative.
Ali Reza Rashidi
Ali Reza Rashidi
Ali Reza Rashidi, a Senior Data Scientist-Gen Al | Al Architect | MLOps with over ten years of experience, He is the author of three books that delve into the world of data and management.

Leave a Reply

Your email address will not be published. Required fields are marked *