De eerste bètarelease van PostgreSQL versie 17 is verschenen. Dit populaire 'opensource relational database management system' draait op een groot aantal besturingssystemen en is daardoor uitstekend inzetbaar in diverse omgevingen. Het is een afgeleide van Ingres, nadat de hoofdontwikkelaar daarvan voor zichzelf is begonnen en deze database van opensource closedsource werd. Uitgebreide releasenotes voor deze uitgave zijn op deze pagina te vinden; dit zijn de belangrijkste veranderingen die we in versie 17 kunnen verwachten:
Query and Operational Performance ImprovementsPostgreSQL 17 builds on recent releases and continues to improve performance across the entire system. Vacuum, the PostgreSQL process responsible for reclaiming storage, has a new internal data structure that has shown up to a 20x memory reduction, along with improvements in overall time to complete its work. Additionally, the vacuum process no longer has a
1GB
limit on the memory it can use (controlled bymaintenance_work_mem
), giving you the option to apply more resources to vacuuming.This release introduces an interface to stream I/O, and can show performance improvements when performing sequential scans and running
ANALYZE
. PostgreSQL 17 also includes configuration parameters that can control scalability of transaction, subtransaction and multixact buffers.PostgreSQL 17 can now use both planner statistics and the sort order of common table expressions (
WITH
queries) to further optimize these queries and help them to execute more quickly. Additionally, this release significantly improves execution time of queries that use theIN
clause with a B-tree index. Starting with this release, PostgreSQL can remove redundantIS NOT NULL
statements from execution on columns that have aNOT NULL
constraint, and no longer needs to do work on queries that contain anIS NULL
clause on anIS NOT NULL
column. Now as of PostgreSQL 17, you can use parallel index builds for BRIN indexes.Workloads with highly concurrent changes can benefit from PostgreSQL 17 with an improvement to how write-ahead log (WAL) locks are managed, with some tests showing up to a 2x performance improvement. Finally, PostgreSQL 17 adds more explicit SIMD instructions, including AVX-512 support for the
Partitioned and distributed workloads enhancementsbit_count
function.PostgreSQL 17 brings more flexibility to partition management, adding the ability to both split and merge partitions, and adds support to partitioned tables for identity columns and exclusion constraints. Additionally, the PostgreSQL foreign data wrapper (
postgres_fdw
) can realize performance benefits from queries withEXISTS
andIN
subqueries as these can now be pushed down to the remote server.PostgreSQL 17 adds new capabilities to logical replication that make it simpler to use it in high availability workloads and on upgrades. Starting with upgrades from PostgreSQL 17 to newer versions, you no longer need to drop logical replication slots when using
Developer Experiencepg_upgrade
, allowing you to avoid resynchronizing data after an upgrade. Additionally, this release introduces failover control for logical replication, providing more control for managing PostgreSQL databases in high availability environments. PostgreSQL 17 also lets logical replication subscribers usehash
indexes for lookups, and introduces thepg_createsubscriber
command-line tool for adding logical replication on a replica using physical replication.PostgreSQL 17 continues to build on the SQL/JSON standard, adding support for the
JSON_TABLE
features that can convert JSON to a standard PostgreSQL table, and SQL/JSON constructor (JSON
,JSON_SCALAR
,JSON_SERIALIZE
) and query functions (JSON_EXISTS
,JSON_QUERY
,JSON_VALUE
). Notably, these features were originally planned for the PostgreSQL 15 release but were reverted during the beta period due to design considerations, which is one reason we ask for you to help us test features during beta! Additionally, PostgreSQL 17 adds more functionality to itsjsonpath
implementation, and the ability to convert JSON values to different data types.The
MERGE
command now supports theRETURNING
clause, letting you further work with modified rows. You can also see what part of theMERGE
command modified the row using the newmerge_action
function. PostgreSQL 17 also lets you update views using theMERGE
command, and adds aWHEN NOT MATCHED BY SOURCE
clause to let you provide behavior if a source row doesn't meet the conditions.
COPY
is used to efficiently bulk load and export data from PostgreSQL, and now with PostgreSQL 17 you may see up to a 2x performance improvement when exporting large rows. Additionally,COPY
has improved performance when the source encoding matches the destination encoding, and has a new option,ON_ERROR
, that lets the copy proceed even if there is an error inserting a row. PostgreSQL 17 also provides better support for asynchronous and more secure query cancellation routines, which drivers can adopt using the libpq API.PostgreSQL 17 includes a built-in collation provider that provides similar sorting semantics to the
Security FeaturesC
collation except withUTF-8
encoding rather thanSQL_ASCII
. This new collation is guaranteed to be immutable, ensuring that the return values of your sorts won't change regardless of what system your PostgreSQL installation runs on.PostgreSQL 17 adds a new connection parameter,
sslnegotiation
, which allows PostgreSQL to perform direct TLS handshakes when using ALPN, eliminating a network roundtrip. PostgreSQL is registered aspostgresql
in the ALPN directory. This release introduces event triggers that execute during authentication, and in libpq includes a new API calledPQchangePassword
that automatically hashes passwords on the client-side to prevent accidental plaintext logging in the server.PostgreSQL 17 adds a new predefined role called
Backup and Export Managementpg_maintain
that gives users permission to executeVACUUM
,ANALYZE
,CLUSTER
,REFRESH MATERIALIZED VIEW
,REINDEX
, andLOCK TABLE
on all relations. This release also ensures thesearch_path
is safe for maintenance operations likeVACUUM
,ANALYZE
,CLUSTER
,REFRESH MATERIALIZED VIEW
andINDEX
. Finally, users can now useALTER SYSTEM
to set the values for unrecognized custom server variables.PostgreSQL 17 introduces the ability to perform incremental backups using
Monitoringpg_basebackup
, and adds a new utility calledpg_combinebackup
that's used as part of the backup restoration process. This release adds a new flag topg_dump
called--filter
, letting you specify a file that contains instructions on what objects to include/exclude from a dump.The
EXPLAIN
command, which provides information about query plans and execution, adds two new options:SERIALIZE
, which shows the amount of time it takes to convert data for network transmission, andMEMORY
, which reports optimizer memory usage. Additionally,EXPLAIN
can now show how much time is spent for I/O block reads and writes.PostgreSQL 17 normalizes the parameters for
CALL
inpg_stat_statements
, reducing the number of entries for frequently called stored procedures. Additionally,VACUUM
progress reporting now shows the progress of vacuuming indexes. PostgreSQL 17 also introduces a new view,pg_wait_events
, which provides descriptions about wait events and can be combined withpg_stat_activity
to give more insight into why an active session is waiting. Additionally, some information in thepg_stat_bgwriter
view is now split out into the newpg_stat_checkpointer
view.