PostgreSQL 16 released with major features and performance improvements
The PostgreSQL Global Development Group released PostgreSQL 16 with major performance and feature updates. Below listed are few important updates.
Peformance Improvements in Query Parallelism, Bulk Data Loading, and Logical Replication, Query Planner, Window Functions.
Faster Distinct Queries: Utilize incremental sorts for SELECT DISTINCT
queries, also aggregates having ORDER BY
or DISTINCT
to use pre-sorted data
Load Balancing: Adds support for load balancing in clients that use libpq.
Logical Replication: Users can perform logical replication from a standby instance, meaning a standby can publish logical changes to other servers.
Monitoring: Introduces pg_stat_io
, a new source of key I/O metrics for granular analysis of I/O access patterns. It helps to track I/O statistics and gives details like which table causes I/O
On-The-Fly Compression: Use SELECT * FROM table COMPRESS 'LZ4' to retrieve compressed data directly.
New commands in psql: Added new command \bind
, which allows users to prepare parameterized queries and use \bind to substitute the variables (e.g SELECT $1::int + $2::int \bind 1 2 \g)
Enhanced JSON Support: Add SQL/JSON constructors, JSON_ARRAY()
, JSON_ARRAYAGG()
, JSON_OBJECT()
, and JSON_OBJECTAGG()
CPU Acceleration using SIMD: Add support for Advanced SIMD (Single Instruction Multiple Data) (NEON) instructions on ARM architectures