SupabaseGurjeet SinghExplainer
New in PostgreSQL 14: What every developer should know
Summary
PostgreSQL 14 introduces several enhancements to improve application performance, data manipulation, query troubleshooting, and database security. Developers can traverse nested JSON data structures using subscripting and store noncontiguous values using multirange data types in single operations. Applications relying on libpq can leverage client-side query pipelining to send multiple queries across high-latency networks without waiting for individual responses, while parallel execution now supports foreign data wrappers, parallel sequential scans, and materialized view refreshes. For observability, query IDs are integrated into live execution tracking via pg_stat_activity, EXPLAIN VERBOSE outputs, and log files. Security upgrades include predefined read-only roles such as pg_read_all_data alongside SCRAM-SHA-256 enabled as the default authentication mechanism.
Context
Developers and database administrators face challenges including managing complex nested JSON, handling disjointed data ranges without multiple inserts, overcoming network latency during batch operations, correlating query monitoring metrics across system components, and maintaining secure password hashing.
Approach / What changed
PostgreSQL 14 adds native JSON subscripting syntax, multirange column types like tsmultirange, libpq client-side query pipelining, system-wide query identifier tracking via compute_query_id, built-in read-only roles, and default SCRAM-SHA-256 password hashing.
Takeaways
PostgreSQL 14 enables JSON key traversal via subscripting syntax and permits noncontiguous data mapping through multirange types such as tsmultirange.
Client-side query pipelining in libpq allows multiple queries to be dispatched simultaneously over a single connection, reducing latency overhead.
Query identifiers can be enabled via compute_query_id to monitor live queries in pg_stat_activity, log files, and EXPLAIN VERBOSE outputs.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.