What is New in PostgreSQL 11
PostgreSQL 11 is a major release that brings significant improvements in performance, partitioning, parallelism, and overall usability. This version focuses on making large-scale databases more efficient while introducing powerful new features for both developers and database administrators.
Key highlights include major enhancements to declarative partitioning, improved parallel query execution, and several new SQL capabilities that simplify complex data operations.
Performance Improvements
PostgreSQL 11 delivers notable performance gains across multiple areas:
- Parallel execution of CREATE INDEX for B-tree indexes
- Parallel sequential scans for more operations
- Improved hash join performance with better memory usage
- Faster vacuuming and index cleanup on large tables
- Better query planning for partitioned tables
Declarative Partitioning Enhancements
Partitioning has been greatly improved in PostgreSQL 11:
- Support for hash partitioning in addition to range and list
- Default partitioning for easier table creation
- Ability to create a default partition that catches values not matching any other partition
- Improved partition pruning for better query performance
- Support for primary keys and unique constraints on partitioned tables
SQL and Developer Features
PostgreSQL 11 adds several useful features for developers:
- New
GROUPING SETS,CUBE, andROLLUPsupport for advanced analytics - Improved support for stored procedures with transaction control
- New window functions including
array_agg()andstring_agg()over windows - Support for covering indexes using the
INCLUDEclause - Enhanced JSON handling with new functions and operators
Security and Administration
Security and manageability have been strengthened with:
- New predefined roles such as
pg_monitor,pg_read_all_settings, andpg_read_all_stats - Improved logging with the ability to log only specific statements
- Better control over JIT compilation settings
- Enhanced authentication methods and password management
Monitoring and Observability
| Area | New / Improved Feature |
|---|---|
| Partitioning | Hash partitioning and default partition support |
| Indexing | Covering indexes with INCLUDE clause |
| Parallelism | Parallel CREATE INDEX and improved parallel query execution |
| Monitoring | New predefined roles for safer monitoring access |
Other Notable Changes
Additional improvements include:
- Removal of several long-deprecated features
- Better support for large databases with improved TOAST handling
- Enhanced JIT compilation performance
- More efficient WAL writing and checkpointing
Migration Considerations
When upgrading to PostgreSQL 11, keep these points in mind:
- Review your partitioning strategy as hash partitioning is now available
- Test applications that rely on stored procedures due to transaction control improvements
- Evaluate the performance benefits of covering indexes and parallel operations
- Update monitoring tools to use the new predefined roles
PostgreSQL 11 offers a strong combination of performance improvements, new partitioning capabilities, and developer-friendly features, making it a valuable upgrade for most production environments.