PostgreSQL 12 Reaches End-of-Life as PG 17 Takes the Throne

According to PostgreSQL’s versioning policy, PostgreSQL 12, released in 2019, officially exits its support lifecycle today (November 14, 2024).

PostgreSQL 12’s final minor version, 12.21, released today (November 14, 2024), marks the end of the road for PG 12. Meanwhile, the newly released PostgreSQL 17.1 emerges as the ideal choice for new projects.

Version Current minor Supported First Release Final Release
17 17.1 Yes September 26, 2024 November 8, 2029
16 16.5 Yes September 14, 2023 November 9, 2028
15 15.9 Yes October 13, 2022 November 11, 2027
14 14.14 Yes September 30, 2021 November 12, 2026
13 13.17 Yes September 24, 2020 November 13, 2025
12 12.21 No October 3, 2019 November 14, 2024

Farewell to PG 12

Over the past five years, PostgreSQL 12.20 (the previous minor version) addressed 34 security issues and fixed 936 bugs compared to PostgreSQL 12.0 released five years ago.

eol.png

This final release (12.21) patches four CVE security vulnerabilities and includes 17 bug fixes. From this point forward, PostgreSQL 12 enters retirement, with no further security or error fixes.

  • CVE-2024-10976: PostgreSQL row security ignores user ID changes in certain contexts (e.g., subqueries)
  • CVE-2024-10977: PostgreSQL libpq preserves error messages from man-in-the-middle attacks
  • CVE-2024-10978: PostgreSQL SET ROLE, SET SESSION AUTHORIZATION resets to incorrect user ID
  • CVE-2024-10979: PostgreSQL PL/Perl environment variable changes execute arbitrary code

The risks of running outdated versions will continue to increase over time. Users still running PG 12 or earlier versions in production should develop an upgrade plan to a supported major version (13-17).

PostgreSQL 12, released five years ago, was a milestone release in my view - the most significant since PG 10. Notably, PG 12 introduced pluggable storage engine interfaces, allowing third parties to develop new storage engines. It also delivered major observability and usability improvements, such as real-time progress reporting for various tasks and csvlog format for easier log processing and analysis. Additionally, partitioned tables saw significant performance improvements and matured considerably.

version-map.png

My personal connection to PG 12 runs deep - when I created Pigsty, an out-of-the-box PostgreSQL database distribution, PG 12 was the first major version we publicly supported. It’s remarkable how five years have flown by; I still vividly remember adapting features from PG 11 to PG 12.

During these five years, Pigsty evolved from a personal PG monitoring system/testing sandbox into a widely-used open source project with global community recognition. Looking back, I can’t help but feel a sense of accomplishment.


PG 17 Takes the Throne

As one version departs, another ascends. Following PostgreSQL’s versioning policy, today’s routine quarterly release brings us PostgreSQL 17.1.

featured.jpg

My friend Longxi Shuai from Qunar likes to upgrade immediately when a new PG version drops, while I prefer to wait for the first minor release after a major version launch.

Typically, many small fixes and refinements appear in the x.1 release following a major version. Additionally, the three-month buffer provides enough time for the PostgreSQL ecosystem of extensions to catch up and support the new major version - a crucial consideration for users of the PG ecosystem.

From PG 12 to the current PG 17, the PostgreSQL community has added 48 new feature enhancements and introduced 130 performance improvements. PostgreSQL 17’s write throughput, according to official statements, shows up to a 2x improvement in some scenarios compared to previous versions - making it well worth the upgrade.

pg17-qps.png

https://smalldatum.blogspot.com/2024/09/postgres-17rc1-vs-sysbench-on-small.html

I conducted a comprehensive performance evaluation of PostgreSQL 14 three years ago, and I’m planning to run a fresh benchmark on PostgreSQL 17.1.

I recently acquired a beast of a physical machine: 128 cores, 256GB RAM, with four 3.2TB Gen4 NVMe SSDs plus a hardware NVMe RAID acceleration card. I’m eager to see what performance PostgreSQL, pgvector, and various OLAP extensions can achieve on this hardware monster - stay tuned for the results.

Overall, I believe 17.1’s release represents an opportune time to upgrade. I plan to release Pigsty v3.1 in the coming days, which will promote PG 17 as Pigsty’s default major version, replacing PG 16.

Considering that PostgreSQL has offered logical replication since 10.0, and Pigsty provides a complete solution for blue-green deployment upgrades using logical replication without downtime, major version upgrades are far less challenging than they once were. I’ll soon publish a tutorial on zero-downtime major version upgrades to help users seamlessly upgrade from PostgreSQL 16 or earlier versions to PG 17.


PG 17 Extensions

One particularly encouraging development is how quickly the PostgreSQL extension ecosystem has adapted to PG 17 compared to the transition from PG 15 to PG 16.

Last year, PG 16 was released in mid-September, but it took nearly six months for major extensions to catch up. For instance, TimescaleDB, a core extension in the PG ecosystem, only completed PG 16 support in early February with version 2.13. Other extensions followed similar timelines.

Only after PG 16 had been out for six months did it reach a satisfactory state. That’s when Pigsty promoted PG 16 to its default major version, replacing PG 15.

Version Date Summary Link
v3.1.0 2024-11-20 PG 17 as default, config simplification, Ubuntu 24 & ARM support WIP
v3.0.4 2024-10-30 PG 17 extensions, OLAP suite, pg_duckdb v3.0.4
v3.0.3 2024-09-27 PostgreSQL 17, Etcd maintenance optimizations, IvorySQL 3.4, PostGIS 3.5 v3.0.3
v3.0.2 2024-09-07 Streamlined installation, PolarDB 15 support, monitor view updates v3.0.2
v3.0.1 2024-08-31 Routine fixes, Patroni 4 support, Oracle compatibility improvements v3.0.1
v3.0.0 2024-08-25 333 extensions, pluggable kernels, MSSQL, Oracle, PolarDB compatibility v3.0.0
v2.7.0 2024-05-20 Extension explosion with 20+ powerful new extensions and Docker applications v2.7.0
v2.6.0 2024-02-28 PG 16 as default, introduced ParadeDB and DuckDB extensions v2.6.0
v2.5.1 2023-12-01 Routine minor update, key PG16 extension support v2.5.1
v2.5.0 2023-09-24 Ubuntu/Debian support: bullseye, bookworm, jammy, focal v2.5.0
v2.4.1 2023-09-24 Supabase/PostgresML support & new extensions: graphql, jwt, pg_net, vault v2.4.1
v2.4.0 2023-09-14 PG16, RDS monitoring, service consulting, new extensions: Chinese FTS/graph/HTTP/embeddings v2.4.0
v2.3.1 2023-09-01 PGVector with HNSW, PG 16 RC1, docs overhaul, Chinese docs, routine fixes v2.3.1
v2.3.0 2023-08-20 Host VIP, ferretdb, nocodb, MySQL stub, CVE fixes v2.3.0
v2.2.0 2023-08-04 Dashboard & provisioning overhaul, UOS compatibility v2.2.0
v2.1.0 2023-06-10 Support for PostgreSQL 12 ~ 16beta v2.1.0
v2.0.2 2023-03-31 Added pgvector support, fixed MinIO CVE v2.0.2
v2.0.1 2023-03-21 v2 bug fixes, security enhancements, Grafana version upgrade v2.0.1
v2.0.0 2023-02-28 Major architectural upgrade, significantly improved compatibility, security, maintainability v2.0.0

Pigsty Release Notes

This time, the ecosystem adaptation from PG 16 to PG 17 has accelerated significantly - completing in less than three months what previously took six. I’m proud to say I’ve contributed substantially to this effort.

As I described in “PostgreSQL’s Ultimate Power: The Most Complete Extension Repository”, I maintain a repository that covers over half of the extensions in the PG ecosystem.

I recently completed the massive task of building over 140 extensions for PG 17 (also adding Ubuntu 24.04 and partial ARM support), while personally fixing or coordinating fixes for dozens of extensions with compatibility issues. The result: on EL systems, 301 out of 334 available extensions now work on PG 17, while on Debian systems, 302 out of 326 extensions are PG 17-compatible.

Entry / Filter All PGDG PIGSTY CONTRIB MISC MISS PG17 PG16 PG15 PG14 PG13 PG12
RPM Extension 334 115 143 70 4 6 301 330 333 319 307 294
DEB Extension 326 104 144 70 4 14 302 322 325 316 303 293

extension.png

Pigsty has achieved grand unification of the PostgreSQL extension ecosystem

Among major extensions, only a few remain without PG 17 support: the distributed extension Citus, the columnar storage extension Hydra, graph database extension AGE, and PGML. However, all other powerful extensions are now PG 17-ready.

Particularly noteworthy is the recent OLAP DuckDB integration competition in the PG ecosystem. ParadeDB’s pg_analytics, personal developer Hongyan Li’s duckdb_fdw, CrunchyData’s pg_parquet, MooncakeLab’s pg_mooncake, and even pg_duckdb from Hydra and DuckDB’s parent company MotherDuck - all now support PG 17 and are available in the Pigsty extension repository.

Considering that Citus has a relatively small user base, and the columnar Hydra already has numerous DuckDB extensions as alternatives, I believe PG 17 has reached a satisfactory state for extension support and is ready for production use as the primary major version. Achieving this milestone took about half the time it required for PG 16.


About Pigsty v3.1

Pigsty is a free and open-source, out-of-the-box PostgreSQL database distribution that allows users to deploy enterprise-grade RDS cloud database services locally with a single command, helping users leverage PostgreSQL - the world’s most advanced open-source database.

PostgreSQL is undoubtedly becoming the Linux kernel of the database world, and Pigsty aims to be its Debian distribution. Our PostgreSQL database distribution offers six key value propositions:

  • Provides the most comprehensive extension support in the PostgreSQL ecosystem
  • Delivers the most powerful and complete monitoring system in the PostgreSQL ecosystem
  • Offers out-of-the-box, user-friendly tools and best practices
  • Provides self-healing, low-maintenance high availability and PITR experience
  • Delivers reliable deployment directly on bare OS without containers
  • No vendor lock-in, a democratized RDS experience with full control

Worth mentioning, we’ve added PG-derived kernel replacement capabilities in Pigsty v3, allowing you to use derivative PG kernels for unique features and capabilities:

  • Microsoft SQL Server-compatible Babelfish kernel support
  • Oracle-compatible IvorySQL 3.4 kernel support
  • Alibaba Cloud PolarDB for PostgreSQL/Oracle kernel support
  • Easier self-hosting of Supabase - the open-source Firebase alternative and all-in-one backend platform

If you’re looking for an authentic PostgreSQL experience, we welcome you to try our distribution - it’s open-source, free, and comes with no vendor lock-in. We also offer commercial consulting support to solve challenging issues and provide peace of mind.

Last modified 2025-03-22: add postgres blogs (117ac1d)