Postgres17 Brings Improvements to JSON, Backup, And More

Postgres has solidified its position as the fastest-growing database globally, catering to a diverse range of workloads, from transaction processing to analytics and artificial intelligence. The recent launch of Postgres 17 introduces a suite of new capabilities designed to enhance user experience and performance.

Performance Enhancements

Among the most notable improvements is the revamped vacuum process, which now utilizes an internal memory structure that is up to 20 times more efficient than previous versions. This enhancement not only accelerates the vacuuming process but also minimizes its impact on concurrent workloads, allowing for smoother operations across the board.

Additionally, enhancements to the write-ahead-log (WAL) are expected to potentially double throughput performance in high-concurrency scenarios. Standard SQL queries employing “IN” clauses and B-tree indexes will experience faster execution times, while BRIN (block range index) indexes can now be built in parallel. The query planner has also received various optimizations, and the introduction of SIMD (single instruction/multiple data) support will expedite computations, particularly with AVX-512.

Backup and Recovery Innovations

EnterpriseDB has played a pivotal role in the development of Postgres 17, particularly with the introduction of block-level incremental backups. This feature promises to significantly reduce backup times; for instance, a backup that previously required 70 minutes can now be completed in just four minutes, marking a remarkable 95% reduction.

Tom Kincaid, EDB’s senior vice president of database servers and tools, emphasized the importance of incremental backup, noting its absence in the core database for over two decades. “It’s odd to see a database that has been around for 20 plus years doesn’t have this,” he remarked. The new “pg_combinebackup” utility further enhances this capability by enabling users to create full backups from multiple incremental backups, streamlining the process for those managing large databases in the terabyte range.

Sub-Transaction Support and JSON Enhancements

Postgres 17 also brings significant improvements in sub-transaction support, particularly beneficial for transactional workloads in sectors like financial services. Previously, processing numerous sub-transactions could severely hinder database performance. With the latest enhancements, users can optimize cache settings without necessitating extensive application modifications during migration from legacy systems.

Furthermore, the update includes various enhancements to JSON functionality, aligning with the SQL/JSON standard as part of the ISO SQL: 2023 specification. This advancement allows users to analyze JSON data using standard SQL mechanisms, effectively transforming complex JSON documents into relational tables. Kincaid noted that this feature enables database developers to leverage their existing SQL skills without delving into the complexities of JSON and JSON path.

Logical Replication and High Availability

Another significant enhancement in Postgres 17 is the improvement in logical replication. In prior versions, major database upgrades required the use of logical replication slots, which could complicate data synchronization. The new version eliminates this requirement, simplifying the upgrade process. Additionally, a new failover control feature enhances logical replication for high availability, bolstering the resilience of Postgres deployments. The community has also introduced a command-line tool for converting physical replicas into logical replicas, further enhancing operational flexibility.

As Jonathan Katz, a member of the PostgreSQL core team, stated, “PostgreSQL 17 highlights how the global open-source community, which drives the development of PostgreSQL, builds enhancements that help users at all stages of their database journey.” The latest version promises to elevate the data management experience, catering to the evolving needs of users worldwide.

Related Items:

Tech Optimizer
Postgres17 Brings Improvements to JSON, Backup, And More