Explore PostgreSQL 15: New Features, Performance Boosts, and Upgrade Guide
PostgreSQL 15 introduces a safer permission model, up to four‑fold sorting speed improvements, a MERGE command, enhanced logical replication with two‑phase commit, parallel query execution, JSON logging, Zstandard/ZL4 compression, new regex functions, and shared‑memory server statistics, making it a compelling upgrade for developers and DBAs.
PostgreSQL community released version 15 in November 2022, bringing many enhancements for developers and database administrators.
Safer permission model
The CREATE privilege is revoked for all users except the database owner, allowing finer‑grained permission control. A new CREATE VIEW .. WITH (security_invoker=on) option lets a view run with the caller’s privileges instead of the creator’s, preventing unauthorized data exposure through views.
Performance acceleration
Sorting of data rows—common in ORDER BY, index creation, and partitioning—has been optimized, delivering up to four times faster in‑memory and on‑disk sorting compared with previous releases.
MERGE operation
A new MERGE command enables conditional INSERT, UPDATE, or DELETE actions based on a source dataset, eliminating the need for procedural functions or complex CTE queries.
The MERGE syntax aligns PostgreSQL more closely with the SQL:2008 standard.
Logical replication enhancements
Logical replication now supports two‑phase commit and allows selective replication of rows and columns. In case of conflicts—such as constraint violations or permission issues—users can skip conflicting transactions or disable subscriptions.
Increased parallelism
Version 15 adds parallel workers to queries such as SELECT DISTINCT, improving performance by executing parts of the query concurrently.
JSON log output
Log entries can now be emitted in JSON format, facilitating structured log processing and integration with external analysis tools.
Compression options
WAL compression can use Zstandard or ZL4 instead of the default pglz, reducing disk usage while preserving data integrity. The same algorithms are available for server‑side backup compression via the pg_basebackup extension.
New POSIX regular‑expression functions
Functions such as regexp_substr() and regexp_count() have been added, enhancing string‑processing capabilities.
Server statistics in shared memory
From version 15, server‑level statistics are stored in shared memory, eliminating the separate statistics collector process. All metrics are accessible through the pg_stat_* views.
Should you upgrade to PostgreSQL 15?
The release contains numerous bug fixes that improve stability and reliability. Because the development cycle includes a six‑month stabilization period between the code freeze in April and the stable release in October, upgrading is considered safe. Users are advised to review the upgrade checklist and release notes before proceeding.
In the 2022 DB‑Engines ranking, PostgreSQL remains one of the most widely used databases.
Understanding these new capabilities helps professional users choose the right features to maximize PostgreSQL performance for their specific workloads.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
21CTO
21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
