On September 25, 2025, the PostgreSQL community released PostgreSQL 18, which brings a range of new features and performance improvements.
Alibaba Cloud PolarDB added support for PostgreSQL 18. You can visit the PolarDB buy page to purchase and try the service. Instructions for activating the service are provided at the end of this article.
PostgreSQL 18 introduces an asynchronous I/O subsystem that allows backend processes to initiate multiple read requests asynchronously. This improves the efficiency of operations such as sequential scans, bitmap heap scans, and cleanup. This feature is controlled by a new database parameter io_method, and a system view pg_aios is added to expose the file handles used for asynchronous I/O.
PostgreSQL 18 further improves the query optimizer by automatically removing unnecessary self-joins on the same table, transforming certain IN (VALUES ...) expressions into x = ANY (...) to obtain more accurate optimizer statistics, and rewriting some OR clauses into array-based forms to accelerate index processing. Performance has also been enhanced for operations such as INTERSECT and EXCEPT, as well as for window aggregates and the handling of view column aliases.
PostgreSQL 18 adds Skip Scan support for B-tree indexes, enabling queries to take advantage of equality conditions on non-leading columns of multi-column B-tree indexes. Non-B-tree unique indexes can be used as partition keys and in materialized views. GIN indexes also gain support for parallel creation.
VACUUM and ANALYZE have been refined. A plain VACUUM can freeze pages that are already completely visible, reducing the overhead of future full-table scans that would otherwise be required to freeze tuples. A new ONLY option allows VACUUM and ANALYZE to manage a partitioned table itself without processing its child partitions.
PostgreSQL 18 adds native support for UUIDv7, which delivers both global uniqueness and time-ordered properties that are more database-friendly.
-- Generate a timestamp-ordered UUID.
SELECT uuidv7();
-- Example result: 01980de8-ad3d-715c-b739-faf2bb1a7aad
-- Extract timestamp information.
SELECT uuid_extract_timestamp(uuidv7());
-- Example result: 2025-06-21 10:20:28.549+01
By default, virtual generated columns are allowed. Unlike stored generated columns, virtual generated columns do not materialize values on write but compute them on read. In addition, the RETURNING clause accepts OLD and NEW references in DML statements, enabling INSERT, UPDATE, DELETE, and MERGE to explicitly return old and new row values by using their RETURNING lists.
Logical replication has been enhanced to include generated columns. If a publishing process specifies an explicit column list, all listed columns including generated and non-generated columns are published. If no column list is provided, the new publish option publish_generated_columns controls whether generated columns are included in the publishing process.
Constraint handling has also been improved: PostgreSQL 18 allows PRIMARY KEY and UNIQUE constraints to be declared as non-overlapping, permits CHECK and foreign key constraints to be defined as NOT ENFORCED, and introduces the ability to modify the inheritance behavior of NOT NULL constraints.
Logical replication has been enhanced to include generated columns. If a publishing process specifies an explicit column list, all listed columns including generated and non-generated columns are published. If no column list is provided, the new publish option publish_generated_columns controls whether generated columns are included in the publishing process.
The release also adjusts default replication behavior. The streaming option of CREATE SUBSCRIPTION defaults to parallel. In addition, ALTER SUBSCRIPTION can be used to change the two-phase commit behavior associated with the replication slot.
PostgreSQL 18 also introduces logging for logical-replication conflicts, which helps engineers detect and resolve conflicts that occur when they apply logical replication changes.
PostgreSQL 18 deprecates MD5 password authentication. CREATE ROLE and ALTER ROLE emit a deprecation warning when an MD5 password is set. At the same time, the release adds OAuth authentication support: a new OAuth authentication method for pg_hba.conf, OAuth-related options in libpq, and a new database parameter oauth_validator_libraries for loading token-validation libraries.
Permission management has been strengthened as well. PostgreSQL 18 introduces pg_get_acl() to retrieve detailed access-control information and has_largeobject_privilege() to check large-object permissions. ALTER DEFAULT PRIVILEGES supports the setting of default permissions for large objects, and a predefined role pg_signal_autovacuum_worker has been added to permit sending signals to autovacuum worker processes.
PolarDB is a new-generation cloud-native database service developed by Alibaba Cloud. PolarDB decouples computing from storage, and effectively and seamlessly integrates software and hardware to deliver a database service that provides second-level elasticity, high performance, massive storage capacity, and robust security and reliability. PolarDB for PostgreSQL is 100% compatible with native PostgreSQL across multiple major versions, including PostgreSQL 11, 14, 15, 16, and 17, as well as the newly released PostgreSQL 18. Designed based on the cloud-native architectural philosophy, PolarDB for PostgreSQL combines the stability, reliability, high performance, and scalability of commercial databases with the simplicity, openness, and rapid iteration of open source cloud databases.

PolarDB for PostgreSQL uses an architecture that decouples computing from storage. The data of a cluster is shared across all compute nodes. PolarDB for PostgreSQL allows you to upgrade or downgrade specifications within minutes, and supports disaster recovery within seconds. PolarDB for PostgreSQL ensures global data consistency and offers data backup and disaster recovery for free.
PolarDB for PostgreSQL is fully compatible with native PostgreSQL. Applications and code designed for native PostgreSQL can run on PolarDB for PostgreSQL with zero to minimal modifications.
PolarDB for PostgreSQL 18 supports a wide range of proprietary enterprise features. Beyond architectural improvements such as compute-storage separation and one primary node and multiple read-only nodes, it also provides the following capabilities:
• Server-side GBK/GB18030 character set support, enabling better services for systems with specific character-set requirements.
• Transparent Data Encryption (TDE), providing enhanced data security.
• Global Plan Cache (GPC), which stores query plans in global memory to reduce per-session memory usage.
• Comprehensive monitoring system, covering full-stack database monitoring, including hardware resources (storage, CPU, and memory), database-level metrics (database age, replication latency, and buffer usage), and SQL-level monitoring (wait events, high-frequency SQL, and slow queries).
• In addition, many enterprise-level features from earlier versions of PolarDB for PostgreSQL are being migrated to version 18, including serverless architecture, hot-and-cold tiered storage, and distributed deployments.
PolarDB for PostgreSQL 18 ships with extensive plug-in support from day one, including:
• Ganos: a self-developed spatio-temporal database engine of Alibaba Cloud, designed for the efficient storage, management, and analysis of large-scale data with temporal and spatial dimensions. It is widely used in scenarios such as smart cities, traffic scheduling, IoT, geofencing, mobile trajectory analysis, and environmental monitoring.
• pgvector: seamlessly integrates vector search into PolarDB as a native data type with indexes and functions. This enables traditional relational databases to efficiently perform k-nearest neighbor (KNN) search, approximate nearest neighbor (ANN) search, vector clustering, filtering, and similarity joins, without moving data to a specialized vector database.
• More than 30 commonly used plug-ins, including hypopg, ip4r, mysql_fdw, pase, pgaudit, pg_bigm, pg_cron, pg_hint_plan, pgjwt, pg_net, pg_similarity, pgsodium, pg_stat_kcache, pgtap, pldebugger, postgres-decoderbufs, prefix, roaringbitmap, sequential_uuids, varbitx, vault, wal2json, zhparser, oss_fdw, tds_fdw, smlar, log_fdw, pg_jieba, oracle_fdw, and postgresql-hll.
• Upcoming plug-ins for multi-model workloads (graph, data lake, columnar, and full-text), time-series (timescaledb and ganos_tsdb), vector, and AI scenarios (polar_ai).
• Compute-storage separation: Compute nodes share storage resources. When you add a read-only compute node, you are charged only compute node fees, which significantly reduces scaling costs.
• Serverless storage: You do not need to manually configure the storage capacity. Storage space is automatically scaled based on the amount of stored data. You need to pay only for the actual storage space that you use.
• Deep kernel-level optimizations: PolarDB for PostgreSQL 18 applies system-level techniques such as profile-guided optimization (PGO), binary optimization and layout tool (BOLT), link-time optimization (LTO), and large code pages to enhance code execution efficiency.
• Table size caching: PolarDB for PostgreSQL 18 significantly reduces open/lseek operations on native PostgreSQL files, improving access speed and efficiency.
• Batch I/O operations: PolarDB for PostgreSQL 18 supports batch file reads, batch file extensions, and batch dirty-page flushes, combined with thorough parameter tuning, delivering exceptional I/O performance.
• High-speed replication and network: PolarDB for PostgreSQL 18 uses physical replication, RDMA data transmission, and shared distributed storage strategies to significantly improve cluster performance.
• Cluster architecture: A cluster contains one primary node and up to 15 read-only nodes, which can meet the performance requirements in high concurrency scenarios and is suitable for read-heavy and write-light workloads.
• Efficient data updates: In a cluster that contains one primary node and multiple read-only nodes and uses shared storage for compute nodes, when data is modified or written to the primary node, the update is immediately synchronized and accessible across all nodes.
• Significantly improved online transaction processing (OLTP) performance: The system supports more than 500,000 read requests per second and more than 150,000 write requests per second.
The distributed storage system and distributed file system enable the storage capacity to smoothly and dynamically scale without being constrained by the storage limits of individual nodes. By default, a single cluster can support up to 500 TB of storage space.
• The shared distributed storage design resolves the data inconsistency issues associated with asynchronous replication from the primary node to read-only nodes and ensures zero data loss when a single-point failure occurs.
• The multi-zone architecture maintains data replicas across multiple zones and provides disaster recovery and backup capabilities for a cluster.
• The system uses log sequence numbers (LSNs) to ensure global consistency for read operations that use a cluster endpoint and prevent inconsistencies caused by replication latency between the primary node and read-only nodes.
• Redo-based physical replication replaces binlog-based logical replication to improve replication efficiency and stability between the primary node and read-only nodes. This ensures that heavy DDL operations, such as adding indexes or fields to large tables, do not cause database delays.
• PolarDB adopts various security measures such as IP address whitelists, virtual private clouds (VPCs), and multiple data replicas to protect your data in terms of access, storage, and management.
• Scale-up or scale-down within 5 minutes CPU and memory resources can be scaled up or scaled down in 5 minutes because of the advanced container virtualization and shared distributed block storage technologies.
• Scale-out or scale-in within 5 minutes
Nodes can be dynamically added or removed, which improves performance and reduces costs. Applications use the cluster endpoint to interact with a cluster, which hides the details and changes of the underlying infrastructure, such as node additions or removals. This ensures that applications function smoothly without the need to manage node adjustments.
The snapshot technology, based on the underlying distributed storage solution, can back up a database with terabytes of data in a few minutes. No lock is required during the entire backup process, which minimizes disruptions and ensures higher system performance.
PolarDB benefits from the PostgreSQL community and actively contributes back. During the adaptation of PolarDB to PostgreSQL 18, multiple issues in PostgreSQL 18 were identified and reported or submitted for fixes to the community. Because potential issues may still exist, the new version is not recommended for direct production use. Before you purchase the service, you must submit a ticket and request technical support to add you to a whitelist. PostgreSQL 18 is expected to reach production-ready stability in version 18.1, at which point PolarDB for PostgreSQL 18 will be generally available for purchase.
1. Submit a ticket.
2. After the whitelist ticket is approved, go to the PolarDB console and click Create Cluster.
3. On the buy page, select PostgreSQL Compatible as Database Engine and select PostgreSQL 18. Configure other parameters based on your requirements, and click Buy Now to create the cluster.
ApsaraDB RDS for SQL Server 2025 Released: Unlocking AI-Ready Enterprise Databases
digoal - May 28, 2024
ApsaraDB - January 6, 2023
digoal - October 31, 2022
digoal - May 28, 2024
digoal - October 12, 2022
Alibaba Cloud Community - October 26, 2021
PolarDB for PostgreSQL
Alibaba Cloud PolarDB for PostgreSQL is an in-house relational database service 100% compatible with PostgreSQL and highly compatible with the Oracle syntax.
Learn More
PolarDB for Xscale
Alibaba Cloud PolarDB for Xscale (PolarDB-X) is a cloud-native high-performance distributed database service independently developed by Alibaba Cloud.
Learn More
PolarDB for MySQL
Alibaba Cloud PolarDB for MySQL is a cloud-native relational database service 100% compatible with MySQL.
Learn More
Database for FinTech Solution
Leverage cloud-native database solutions dedicated for FinTech.
Learn MoreMore Posts by ApsaraDB