PolarDB for PostgreSQL, compatible with PostgreSQL 17, is now generally available. PostgreSQL 17 delivers a more robust database experience through performance enhancements, simplified operations and maintenance, and expanded functionality.
Version Overview
Building on the open-source PostgreSQL 17 community release, PolarDB adds proprietary capabilities, including the spatiotemporal engine GanosBase, global plan cache, and support for GBK and GB18030 character sets. The initial release of PolarDB for PostgreSQL 17 supports the following extensions: hll, log_fdw, mysql_fdw, pase, pg_bigm, pg_cron, pg_jieba, pg_repack, pg_similarity, pgtap, pgvector, pldebugger, prefix, varbitx, zhparser, and ganos.
In addition, PolarDB has undergone extensive performance optimization, including instruction set optimization (single instruction multiple data (SIMD) and atomic operations), system-level optimization (PGO, BOLT, and LTO), and I/O performance optimization.
References: PostgreSQL 17 Community Announcement.
Release Date
April 3, 2025, UTC+8
Billing Details
Both subscription and pay-as-you-go billing methods are supported. You can combine either method with compute and storage plans for flexible cost management. For more information, see Product Billing.
Key Improvements
System-Level Performance Improvements
Vacuum Process Memory Consumption Optimization: The Vacuum process is essential for maintaining healthy PostgreSQL database operation and consumes cluster resources during execution. PostgreSQL 17 introduces a new internal memory structure for Vacuum operations, reducing memory consumption by up to 20 times. This improvement accelerates Vacuum execution and reduces shared resource usage, freeing additional capacity for workloads.
I/O Layer Performance Optimization: PostgreSQL 17 improves WAL log processing, increasing write throughput for high concurrency workloads by up to two times. New streaming I/O interfaces also accelerate sequential scans and ANALYZE operations that update query planner statistics.
Query Optimization: PostgreSQL 17 improves the performance of
INclause queries that use B-tree indexes (the default indexing method in PostgreSQL). Additionally, this version supports parallel BRIN index builds. PostgreSQL 17 introduces several query planning improvements, including optimizations forNOT NULLconstraints and enhancements for common table expressions (WITH queries). This version adds more single instruction multiple data (SIMD) support to accelerate computations, such as using AVX-512 for thebit_countfunction.
Developer Experience
PostgreSQL was the first relational database to add JSON support (in 2012). PostgreSQL 17 further refines its implementation of the SQL/JSON standard.
It introduces JSON_TABLE, enabling developers to convert JSON data into standard PostgreSQL tables.
It supports SQL/JSON constructors (
JSON,JSON_SCALAR,JSON_SERIALIZE) and query functions (JSON_EXISTS,JSON_QUERY,JSON_VALUE), giving developers more ways to interact with JSON data.It adds more JSONPath expressions focused on converting JSON data to native PostgreSQL data types—including numeric, Boolean, string, and date/time types.
PostgreSQL 17 extends the MERGE command with a
RETURNINGclause for conditional updates and the ability to update views.PostgreSQL 17 enhances batch loading and data exporting capabilities, including up to two times faster performance when exporting large rows using the COPY command. COPY performance also improves when source and target encodings match. A new
ON_ERRORoption lets you continue importing after an insertion error.PostgreSQL 17 expands partitioned data management and cross-cluster data distribution across remote PolarDB for PostgreSQL clusters. This version supports identity columns and exclusion constraints on partitioned tables. Additionally, the PostgreSQL foreign data wrapper (postgres_fdw) pushes
EXISTSandINsubqueries to remote servers for more efficient query processing.PostgreSQL 17 introduces a built-in, cross-platform, immutable collation provider. This provider offers sorting semantics similar to
Ccollations but usesUTF-8encoding instead ofSQL_ASCII. Using this collation provider ensures consistent sorted results for text-based queries regardless of where PostgreSQL runs.
Logical Replication Enhancements
Logical replication streams data in real time for many use cases. Before PostgreSQL 17, users performing major version upgrades had to delete logical replication slots, requiring full resynchronization of subscriber data after the upgrade. Starting with this version, you no longer need to delete logical replication slots, simplifying upgrades when using logical replication.
PostgreSQL 17 adds failover control for logical replication, improving reliability in high availability (HA) environments. This version also introduces the pg_createsubscriber command line interface (CLI) tool, which enables logical replication on replica standbys that use physical replication.
Security and Operations Management Options
PostgreSQL 17 further extends how users manage the entire lifecycle of their database systems. PolarDB for PostgreSQL introduces a new TLS option,
sslnegotiation, which enables direct TLS handshake when using ALPN (registered aspostgresqlin the ALPN directory).PostgreSQL 17 adds a new
pg_maintainpredefined role, granting users permissions to perform maintenance operations.PostgreSQL 17's native backup tool,
pg_basebackup, supports incremental backup. It also includes thepg_combinebackuptool to reconstruct full backups. Additionally,pg_dumpadds a new--filteroption to select objects included in dump files.PostgreSQL 17 also enhances monitoring and analysis features.
EXPLAIN now displays time spent on local I/O block reads and writes. It also includes two new options:
SERIALIZEandMEMORY, which show time spent on data conversion during network transmission and memory usage, respectively.It supports viewing the progress of index cleanup. It also adds the
pg_wait_eventssystem view, which—combined with thepg_stat_activityview—provides deeper insights into the causes of active session waits.
Upgrade Guide
Upgrade to PolarDB for PostgreSQL 17. Upgrading to PolarDB for PostgreSQL compatible with PostgreSQL 17 keeps you synchronized with the PostgreSQL community, providing access to more resources and support to help resolve issues and adopt database Best Practices.
When upgrading from PolarDB for PostgreSQL version 16 to PolarDB for PostgreSQL version 17, most data types, built-in functions, table columns, and objects have no significant changes, only minor improvements. You can achieve nearly 100% compatibility using methods such as logical replication. We recommend that you use the DTS tool for migration between PolarDB for PostgreSQL versions. The specific changes are detailed below.
This section covers only the differences between PolarDB PostgreSQL Edition version 17 and PolarDB PostgreSQL Edition version 16. For differences when upgrading other PolarDB PostgreSQL Edition versions to PolarDB PostgreSQL Edition version 16, see Differences between PostgreSQL 16 and PostgreSQL 15 and Differences between PostgreSQL 15 and PostgreSQL 14.
Types
Restrict
agoto appear only at the end of INTERVAL values.Prohibit multiple occurrences of empty INTERVAL units.
Views
Update
pgrowlockslock mode output labels. ChangeSharetoFor ShareandKey SharetoFor Key Share.Update file boundary handling for two WAL filename functions. Before PostgreSQL 17, the
pg_walfile_name()andpg_walfile_name_offset()functions returned the previous segment number for LSNs located at file boundaries. PostgreSQL 17 returns the current segment number.Remove the
element_types.domain_defaultfield frominformation_schema.Rename I/O block read and write time statistics columns in
pg_stat_statements. Changeblk_read_timetoshared_blk_read_timeandblk_write_timetoshared_blk_write_time.Update the default value representation for statistics target columns.
pg_attribute.attstattargetandpg_statistic_ext.stxstattargetuse NULL to represent the default statistics target.Rename localization-related column names. Change
pg_collation.colliculocaletocolllocaleandpg_database.daticulocaletodatlocale.Refactor VACUUM progress statistics columns. Change
max_dead_tuplestomax_dead_tuple_bytes,num_dead_tuplestonum_dead_item_ids, and add thedead_tuple_bytesfield.Rename SLRU-related statistics view columns. The
pg_stat_slruview columns andpg_stat_reset_slru()parameter names are synchronized.
Functions and Expressions
Function changes use a secure search_path during maintenance operations. This prevents unsafe access during maintenance operations such as ANALYZE, CLUSTER, CREATE INDEX, CREATE MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW, REINDEX, or VACUUM. For functions used by expression indexes or materialized views that reference non-default schemas, you must explicitly specify search_path when creating the function.
Permissions
Update how SET SESSION AUTHORIZATION handles superuser permissions for initial session users. The new behavior is based on the session user's superuser permission status when the SET SESSION AUTHORIZATION command executes—not the status at connection time.
Remove the impersonation feature by database user (the
db_user_namespaceattribute, rarely used).
Other
Remove the
old_snapshot_thresholdserver parameter. This parameter allowed Vacuum to remove rows that might still be visible to running transactions. Subsequent access would then cause asnapshot too olderror.Remove the
adminpackextension. This extension was used by pgAdmin III, which is no longer supported.Remove the
trace_recovery_messagesserver parameter.