We’re excited to announce that PostgreSQL 17 Major Version Upgrade (MVU) is now available in preview for Azure Database for PostgreSQL flexible server!
This release enables in-place upgrades from PostgreSQL 11, 12, 13, 14, 15, or 16 to 17—helping you modernize your workloads without reconfiguring applications or migrating data.
Why upgrade to PostgreSQL 17?
PostgreSQL 17 brings meaningful improvements across performance, SQL functionality, and upgrade resilience. Here are some of the highlights:
- Faster and smarter vacuuming: PostgreSQL 17 improves the VACUUM process by reducing memory usage, finishing faster, and reporting progress for index vacuuming. These changes help improve autovacuum responsiveness, especially on large or frequently updated tables.
- Upgrade resilience with logical replication: In earlier versions, logical replication slots had to be manually dropped before performing a major version upgrade. With PostgreSQL 17, this limitation is removed—making version upgrades smoother and less error-prone in environments using logical replication.
- Advancements in SQL/JSON functionality: PostgreSQL 17 builds on the SQL/JSON standard with the addition of the JSON_TABLE feature. This enables direct conversion of JSON data into relational rows and columns—making it easier to analyze semi-structured data in SQL.
- Enhanced MERGE capabilities: The MERGE command, introduced in PostgreSQL 15, is enhanced in PG17 to support the RETURNING clause. This allows applications to retrieve modified rows as part of the same operation—useful for audit logging, chaining operations, or simplifying logic.
- Improved partitioning flexibility: PG17 adds the ability to SPLIT and MERGE table partitions, giving DBAs and developers more control over how large datasets are managed, queried, and optimized over time.
- General performance gains: As with every major release, PostgreSQL 17 includes a range of under-the-hood improvements to query planning, execution, and memory management—contributing to faster and more predictable performance for OLTP and analytical workloads alike.
To explore all changes in depth, refer to the official PostgreSQL 17 release notes.
With PostgreSQL 11 and 12 now past their community end-of-life EOL—in November 2023 and November 2024 respectively—customers are strongly encouraged to upgrade to a supported version like PostgreSQL 17. Once a PostgreSQL version reaches EOL, it no longer receives security patches, bug fixes, or performance updates from the open-source community. As a managed service, Azure Database for PostgreSQL aligns with this policy to ensure customers are running secure, stable, and compliant database workloads.
PostgreSQL 17, released in September 2024, will be supported by the community until November 2029, offering a secure and future-ready foundation for your applications. Upgrading to PG17 not only extends your support window but also unlocks the latest performance enhancements, SQL capabilities, and compatibility with new Azure features. For long-term reliability and continued platform support, now is the time to plan your upgrade.
In-place upgrades on Azure: Built for simplicity
Azure’s in-place upgrade capability allows you to move to a newer major version with just a few clicks—no data migration, no connection string changes, and minimal downtime.
- Retain your server name, IP address, and firewall/VNet settings
- Skip versions and upgrade directly from 14/15/16 → 17
- HA-enabled servers are automatically handled (with HA re-enabled post-upgrade)
- Upgrade logs and pre-check results are available in the Azure Portal for transparency
To learn more about the end-to-end upgrade process, including downtime expectations and supported configurations, refer to the official major version upgrade documentation.
How to Upgrade
You can upgrade your Azure Database for PostgreSQL flexible server instance to PostgreSQL 17 using either the Azure Portal or the Azure CLI, depending on your preferred workflow.
Option 1: Upgrade via Azure Portal
- Go to your Azure Database for PostgreSQL flexible server in the Azure Portal.
- In the left-hand navigation pane, select Upgrade.
- Choose PostgreSQL 17 as the target version.
- Review the upgrade confirmation prompt, then proceed to initiate the upgrade.
During the upgrade, the server will go offline briefly while PostgreSQL binaries and system catalogs are updated. You can monitor progress using the Upgrade Logs (PG_Upgrade_Logs), available under the server logs section in the portal.
Option 2: Upgrade via Azure CLI
To upgrade from the command line, use the following Azure CLI command:
az postgres flexible-server upgrade \
--resource-group <your-resource-group> \
--name <your-server-name> \
--version 17
This command triggers the in-place upgrade for your server. Before applying it to production, we recommend restoring the server to a non-production environment using point-in-time restore and validating the upgrade there.
For step-by-step instructions using CLI or REST API, refer to the official how-to guide.
Note: During the preview, PostgreSQL 17 upgrades are supported only in select Azure regions such as East US, East US 2, Central US and West US 3. Broader regional availability will follow as we move toward general availability.
Upgrade recommendations: Strategies and tips
While the upgrade process is streamlined, here are a few practical recommendations to ensure success:
- Test your upgrade in a staging environment - Clone your production server or restore from backup and run a test upgrade. This helps identify issues early—especially around extensions, roles, and query plans.
- Clean up unsupported extensions and roles - Some extensions (e.g. ‘Pgrouting’, ‘Apache age’) are not yet supported in PG17. These will be flagged during pre-check.
- Refresh statistics after upgrade - Run ANALYZE; in each database post-upgrade to refresh query planner statistics. This ensures optimal performance under the new version.
- Monitor logs and allow storage headroom - Use the built-in PG_Upgrade_Logs to diagnose issues and ensure at least 15–20% free storage to avoid failures due to space constraints.
Closing thoughts
At Azure Postgres, we’re committed to making major version upgrades as seamless and low-disruption as possible—so you can stay current with PostgreSQL innovations while maintaining business continuity. With in-place upgrade support for PostgreSQL 17 now in preview, upgrading is simpler than ever: no data migration, no changes to connection strings, and minimal downtime.
If you’re currently running PostgreSQL 11 or 12, now is the time to begin planning your upgrade. Staying on supported versions ensures you receive critical security patches, benefit from performance improvements, and remain compatible with new Azure capabilities.
To help you get started, here are two essential resources:
- Major version upgrades in Azure Database for PostgreSQL flexible server – Overview of upgrade behavior, limitations, and supported scenarios
- How-to guide: Performing a major version upgrade – Step-by-step instructions to upgrade via the Azure Portal, CLI, or REST API
Let’s keep your PostgreSQL workloads modern, secure, and optimized.
Updated May 23, 2025
Version 8.0varun-dhawan
Microsoft
Joined August 26, 2022
Azure Database for PostgreSQL Blog
Follow this blog board to get notified when there's new activity